Changed digitalwrite to pinmode, to make it more obvious what is happening here, and to offer more support within the Arduino API
This commit is contained in:
@@ -73,7 +73,7 @@ void setup()
|
|||||||
|
|
||||||
// Use the internal pullup to be able to hook up this sketch directly to an energy meter with S0 output
|
// Use the internal pullup to be able to hook up this sketch directly to an energy meter with S0 output
|
||||||
// If no pullup is used, the reported usage will be too high because of the floating pin
|
// If no pullup is used, the reported usage will be too high because of the floating pin
|
||||||
digitalWrite(DIGITAL_INPUT_SENSOR,HIGH);
|
pinMode(DIGITAL_INPUT_SENSOR,INPUT_PULLUP);
|
||||||
|
|
||||||
attachInterrupt(INTERRUPT, onPulse, RISING);
|
attachInterrupt(INTERRUPT, onPulse, RISING);
|
||||||
lastSend=millis();
|
lastSend=millis();
|
||||||
|
|||||||
Reference in New Issue
Block a user