I have set up an mcp3008 chip and a slide pot on my pi because I wanted a nice old fashioned volume control, and all of that seems to working fine and I am quite happy with it.
Now I have 7 redundant analogue channels, which I would quite like to repurpose as simple on/off buttons, because the chip just happens to be there and it would save a bunch of gpio pins which I could use for more interesting stuff.
My problem is, they seem to float wildly all over the place when there is no voltage running through them, so while I can add a switch to one and read 3.3v reliably enough, when the switch is off they just read a bunch of noise. This doesn't happen with the slide pot, presumably since one end is grounded.
Can anyone suggest a simple solution ?
Shall I just live with the noise , or is there something really obvious I am missing?
Bear in mind I am asking because I am a complete moron as far as electronics are concerened, so no answer can be too patronising :)