OpenSprinkler › Forums › Hardware Questions › OpenSprinkler Pi (OSPi) › OSPi – Interval – Garage Door Sensing and Control – Success › Re: Re: OSPi – Interval – Garage Door Sensing and Control – Succ
If the readpins.py script correctly reports the state of the door, that verifes that the hardware is hooked up correctly, good!
After this article was written Dan changed the setmode for the GPIO
This has the effect of changing the pin number you need to define in ospi.py.
Pin 24 in GPIO.setmode(GPIO.BCM) becomes
Pin 18 in GPIO.setmode(GPIO.BOARD)
The readpins.py script explicity defines Pin 24 for doorsense in GPIO.setmode(GPIO.BCM), so if that’s the pin you used, it will report correctly.
Check the setmode command used in the version of ospi.py that you are running. If it is GPIO.BOARD, change the pin definition from 24 to 18.
Sounds like you are very close. I hope this helps…