Simple project - I have a magnetic reed switch (alarm sensor type) which I am monitoring via digital input. Connected to the RPi3 ground and GPIO 26. When the sensor is disengaged, it reads zero, all is good. But when the sensor is engaged (i.e. magnet is close to switch), it flip flops from 0 to 1 constantly.
I’ve read other posts where this is happening and it seems like putting a resistor somewhere helps, but…
if I use python on the pi and set the input pin to have the built-in resistor in the “pull up” state (GPIO.setup(rpin, pull_up_down=GPIO.PUD_UP), all works as expected in python. I don’t see the flip-flop at all. If I leave out the pullup, then I do see the flipflop.
So my question is do I need an external resistor somewhere or can I ask cayenne to set up this pin with the pull-up resistor?
Also, if I need a resistor, can someone tell me what size and where to place it?