As a newbie Im testing my Pi 2 B's GPIO. Why doesn't the code below switch the 15 pin on and off with an interval, but keeps it turned on?
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
GPIO.setup(15, GPIO.OUT)
for i in range(1000):
GPIO.output(15,1)
time.sleep(3)
GPIO.output(15,0)
print("switch")
GPIO.cleanup()