Advertisement
Guest User

Untitled

a guest
Jan 24th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. import time
  2. import RPi.GPIO as GPIO
  3. print "hello world"
  4.  
  5. GPIO.setmode(GPIO.BCM)
  6. GPIO.setup(18, GPIO.OUT)
  7. number = 0.001
  8. timer = 200
  9. while 1:
  10.  
  11. while timer != 0 :
  12. GPIO.output(18, True)
  13. time.sleep(number)
  14. GPIO.output(18, False)
  15. time.sleep(number)
  16. timer = timer - 1
  17. timer = 200
  18. time.sleep(0.3)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement