Skip to content

Commit 6296650

Browse files
committed
Removed extra pins to prevent WDT resets
1 parent 6761962 commit 6296650

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

ATM90E26.ino

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
void setup() {
1919
/* Initialize the serial port to host */
20-
Serial.begin(9600);
20+
Serial.begin(115200);
2121
/*Initialise the ATM90E26 + SPI port */
2222
InitEnergyIC();
2323
}
@@ -26,19 +26,19 @@ void loop() {
2626
/*Repeatedly fetch some values from the ATM90E26 */
2727
Serial.print("Sys Status:");
2828
Serial.println(GetSysStatus(),HEX);
29-
delay(10);
29+
yield();
3030
Serial.print("Meter Status:");
3131
Serial.println(GetMeterStatus(),HEX);
32-
delay(10);
32+
yield();
3333
Serial.print("Voltage:");
3434
Serial.println(GetLineVoltage());
35-
delay(10);
35+
yield();
3636
Serial.print("Current:");
3737
Serial.println(GetLineCurrent());
38-
delay(10);
38+
yield();
3939
Serial.print("Active power:");
4040
Serial.println(GetActivePower());
41-
delay(10);
41+
yield();
4242
Serial.print("p.f.:");
4343
Serial.println(GetPowerFactor());
4444
delay(1000);

energyic.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@
7070

7171
// pins used for the connection with the sensor
7272
// the other you need are controlled by the SPI library):
73-
const int energy_IRQ = 2;
73+
//const int energy_IRQ = 2;
7474
const int energy_CS = 10;
75-
const int energy_WO = 8;
75+
//const int energy_WO = 8;
7676

7777
unsigned short CommEnergyIC(unsigned char RW,unsigned char address, unsigned short val);
7878
double GetLineVoltage();

energyic.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,9 @@ unsigned short GetSysStatus(){
124124
void InitEnergyIC(){
125125
unsigned short systemstatus;
126126

127-
pinMode(energy_IRQ,INPUT );
127+
//pinMode(energy_IRQ,INPUT );
128128
pinMode(energy_CS,OUTPUT );
129-
pinMode(energy_WO,INPUT );
129+
//pinMode(energy_WO,INPUT );
130130

131131
/* Enable SPI */
132132
SPI.begin();

0 commit comments

Comments
 (0)