Skip to content

Commit f4c81ef

Browse files
committed
Update examples
1 parent 3da4aa6 commit f4c81ef

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

examples/Example1_ReadVoltageCurrentPower/Example1_ReadVoltageCurrentPower.ino

+3-3
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ void setup()
4343

4444
void loop()
4545
{
46-
float volts;
47-
float amps;
48-
float watts;
46+
float volts = 0.0;
47+
float amps = 0.0;
48+
float watts = 0.0;
4949

5050
mySensor.readInstantaneous(&volts, &amps, &watts); // Read the instantaneous voltage, current and power
5151
Serial.print(F("Volts: "));

examples/Example4_ReadVoltageCurrentRMS/Example4_ReadVoltageCurrentRMS.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ void setup()
3939

4040
// We need to connect the LO pin to the 'low' side of the AC source.
4141
// So we need to set the divider resistance to 4M Ohms (instead of 2M).
42-
mySensor.setDividerRes(4000000);
42+
mySensor.setDividerRes(4000000); // Comment this line if you are using GND to measure the 'low' side of the AC voltage
4343
}
4444

4545
void loop()

examples/Example5_ReadVoltageCurrentPowerRMS/Example5_ReadVoltageCurrentPowerRMS.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ void setup()
3939

4040
// We need to connect the LO pin to the 'low' side of the AC source.
4141
// So we need to set the divider resistance to 4M Ohms (instead of 2M).
42-
mySensor.setDividerRes(4000000);
42+
mySensor.setDividerRes(4000000); // Comment this line if you are using GND to measure the 'low' side of the AC voltage
4343
}
4444

4545
void loop()

0 commit comments

Comments
 (0)