Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please explain the arduino coding below 20 File Edit Sketch Tools Help sketch_octobs int sensortA12 - AO; float nVPP; float nCurrThruResistorPP; float nCurrThruResistorRMS; float nCurrentThruWire;
Please explain the arduino coding below
20 File Edit Sketch Tools Help sketch_octobs int sensortA12 - AO; float nVPP; float nCurrThruResistorPP; float nCurrThruResistorRMS; float nCurrentThruWire; void setup() { Serial.begin(9600); pinMode (sensorTA12, INPUT); } void loop() { nVPP = getVPP(); nCurrThruResistorPP = (nVPP/200.0) * 1000.0; nCurrThruResistorRMS = nCurrThruResistorPP * 0.707; nCurrentThruwire - nCurrThruResistorRMS. 1000; Serial.print("Volts Peak : "); Serial.println(nVPP,3); Serial.print("Current Through Resistor (Peak) : "); Serial.print (nCurrThruResistorPP,3); Serial.println(" MA Peak to Peak"); Serial.print("Current Through Resistor (RMS): "); Serial.print (nCurrThruResistorRMS, 3); Serial.println(" MA RMS"); Serial.print("Current Through Wire : "); ce File Edit Sketch Tools Help sketch_oct01s serial.prin current Through sessor TS Serial.print (nCurrThruResistorRMS, 3); Serial.println(" MA RMS"); Serial.print("Current Through Wire : "); Serial.print (nCurrentThruWire, 3); Serial.println(" MA RMS"); Serial.println(); delay(100); } float getVPP) { Float result; int readValue; int maxValue = 0; uint32_t start_time = millis(); while ((millis()-start_time) maxValue) { maxvalue = readValue; } } result = (maxValue * 5.0)/1024.0; return resultStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started