here is the problem , I am helping a hackspace member complete a robot, based on the explorer phat and a PI 3. We want to add line following using the normal type of sensors.
It did not work, so we tried to read the state of a switch.
With nothing connected to input 1 when we read the state it varied between 0 and 1. We tried adding a pull up resistor and that did not change anything, still a noisy response.
At home, with my explorer phat connected to a PI zero, input 1 not connected to anything I get a solid 0, when I connect it to 5v I get a solid 1. No pull up resistor fitted.
I realise I could just be “lucky” (or maybe unlucky) in that it works at home without a pull up resistor.
Hence the question, should we be using a pull up resistor?
Thanks in advance