Skip to content

Commit fdeeb46

Browse files
committed
examples update
1 parent 00b2fad commit fdeeb46

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

examples/Basic_Energy_Meter/Basic_Energy_Meter.ino

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ const long interval = 1000;
1515
* Energy Accumulation Method
1616
*/
1717
unsigned short LineFreq = 60; //
18-
unsigned short SumMode = 1; // 0: Aritmethic Energy Sum, 1: Absolute Energy Sum
18+
unsigned short SumMode = 0; // 0: Aritmethic Energy Sum, 1: Absolute Energy Sum
19+
unsigned short phases = 2;
1920

2021
/*
2122
* 1x (CTs up to 60mA/720mV)
@@ -50,8 +51,8 @@ void setup() {
5051
pinMode(LED_MCM, OUTPUT);
5152

5253
Serial.println("Start ATM90E32");
53-
mcm.begin(CS_pin, LineFreq, SumMode, IAGain, IBGain, ICGain, VoltageCal, CT1Cal, 0, CT2Cal);
54-
mcm.setVIOffset(64608, 64608, 64608, 64606, 64608, 64606); // Values obtained with VIoffsetCal()
54+
eic.begin(CS_pin, LineFreq, phases, SumMode, IAGain, IBGain, ICGain, VoltageCal, CT1Cal, 0, CT2Cal);
55+
eic.setVIOffset(64608, 64608, 64608, 64606, 64608, 64606); // Values obtained with VIoffsetCal()
5556
delay(1000);
5657
unsigned short sys0 = mcm.GetSysStatus0(); //EMMState0
5758

examples/Calibration_Example/Calibration_Example.ino

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ const long interval = 1000;
3232
* Energy Accumulation Method
3333
*/
3434
unsigned short LineFreq = 60; //
35-
unsigned short SumMode = 1; // 0: Aritmethic Energy Sum, 1: Absolute Energy Sum
36-
35+
unsigned short SumMode = 0; // 0: Aritmethic Energy Sum, 1: Absolute Energy Sum
36+
unsigned short phases = 2;
3737
/*
3838
* 1x (CTs up to 60mA/720mV)
3939
* 2x (CTs up to 30mA/360mV)
@@ -68,8 +68,8 @@ void setup()
6868
pinMode(LED_MCM, OUTPUT);
6969

7070
Serial.println("Start ATM90E32");
71-
mcm.begin(CS_pin, LineFreq, SumMode, IAGain, IBGain, ICGain, VoltageCal, CT1Cal, 0, CT2Cal);
72-
mcm.setVIOffset(64608, 64608, 64608, 64606, 64608, 64606); // Values obtained with VIoffsetCal()
71+
eic.begin(CS_pin, LineFreq, phases, SumMode, IAGain, IBGain, ICGain, VoltageCal, CT1Cal, 0, CT2Cal);
72+
eic.setVIOffset(64608, 64608, 64608, 64606, 64608, 64606); // Values obtained with VIoffsetCal()
7373
delay(1000);
7474
unsigned short sys0 = mcm.GetSysStatus0(); // EMMState0
7575

0 commit comments

Comments
 (0)