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:
Marco Noord
2016-01-13 17:57:48 +01:00
parent a6569c884a
commit 9858cb19f0
@@ -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
// 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);
lastSend=millis();