[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]
GPIO.output (x, False) Doesn't work
I need help troubleshooting this. I am trying to get my relay working using a very simple Python codes. Here it is: