Advertisement
Guest User

Untitled

a guest
Aug 18th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. import RPi.GPIO as GPIO
  2. import time
  3.  
  4. GPIO.setmode(GPIO.BOARD)
  5. GPIO.setup(11, GPIO.OUT)
  6. # loop through 50 times, on/off for 1 second
  7. for i in range(50):
  8. GPIO.output(11, True)
  9. time.sleep(1)
  10. GPIO.output(11, False)
  11. time.sleep(1)
  12. GPIO.cleanup()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement