OpenSprinkler › Forums › Hardware Questions › OpenSprinkler Pi (OSPi) › OSPi 1.2 – ADC – Rain Sensor – Garage Door Control › Re: Re: OSPi 1.2 – ADC – Rain Sensor – Garage Door Control
July 15, 2013 at 2:34 pm #24810
For reading rain sensor, one GPIO pin is sufficient (since most rain sensors return a digital signal, i.e. closed or open, instead of an analog signal). This is essentially the same as reading a button (pressed or released), so if you just search for how to use RPi to read a pushbutton that should work for rain sensor as well. The standard way is to use a pull-up resistor (e.g 10K), one pin goes to +3.3V, the other pin goes to one wire of the rain sensor, and the other wire of the rain sensor goes to ground.