From 9858cb19f0f3e5a08df9e9079b254837132439ad Mon Sep 17 00:00:00 2001 From: Marco Noord Date: Wed, 13 Jan 2016 17:57:48 +0100 Subject: [PATCH] Changed digitalwrite to pinmode, to make it more obvious what is happening here, and to offer more support within the Arduino API --- .../examples/EnergyMeterPulseSensor/EnergyMeterPulseSensor.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/MySensors/examples/EnergyMeterPulseSensor/EnergyMeterPulseSensor.ino b/libraries/MySensors/examples/EnergyMeterPulseSensor/EnergyMeterPulseSensor.ino index 144bc72..9b957de 100644 --- a/libraries/MySensors/examples/EnergyMeterPulseSensor/EnergyMeterPulseSensor.ino +++ b/libraries/MySensors/examples/EnergyMeterPulseSensor/EnergyMeterPulseSensor.ino @@ -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();