Page 1 of 1

INPUT_PULLUP Misbehaving

PostPosted: Thu Jan 17, 2019 5:02 am
by brettsonian
Hi All,
So i've got an interesting scenario, I have a number of sonoffs scattered at different locations, they all do the same thing, reading a reed switch off a mechanical changeover actuator. Works a treat, updates a ce
ntral server over MQTT happy days. Recently I have had 2 units reporting incorrectly and now that I've inspected more carefully it seems the polarity of the INPUT_PULLUP has reversed.
Normally digitalReading pin 14 linked to ground when the circuit is closed is HIGH and reading when the circuit is open is LOW (pinMode(14, INPUT_PULLUP)). Now on these two units it's reversed, an open circuit reads HIGH and bridging to ground read LOW?!?!

Any pointers?