RaspberryPi Projects DISCUSSION

GPIO.output (x, False) Doesn't work

Started by syedzainnasir GPIO.output (xFalse) Doesn't work
0 replies 248 views 1 participants
Latest activity · 07 Mar 2017

GPIO.output (x, False) Doesn't work

syedzainnasir RaspberryPi Projects Forum
#1
I need help troubleshooting this. I am trying to get my relay working using a very simple Python codes. Here it is: [code]import RPi.GPIO as GPIO GPIO.setwarnings(False) GPIO.setmode(GPIO.BOARD) GPIO.setup(37, GPIO.OUT) import time for x in range (0,3): GPIO.output(37, True) print "Lights on" time.sleep(3) GPIO.output(37, False) <<<here where it is supposed to turn off but doesn't print "Lights off" GPIO.cleanup() <<< Relay's green light turn off here[/code]

Community replies 0

Be the first to help

There are no replies yet.

TEP COMMUNITY