Guest User

Untitled

a guest
May 29th, 2015
257
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from RPi import GPIO
  2. from time import sleep
  3. import sys
  4.  
  5. led = 12
  6.  
  7. GPIO.setmode(GPIO.BOARD)
  8. GPIO.setup(led, GPIO.OUT)
  9.  
  10. while True:
  11. sys.stdout.write("on. ")
  12. sys.stdout.flush()
  13. GPIO.output(led, True)
  14. sleep(0.2)
  15.  
  16. sys.stdout.write("off. ")
  17. sys.stdout.flush()
  18. GPIO.output(led, False)
  19. sleep(0.2)
RAW Paste Data