Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from RPi import GPIO
- from time import sleep
- import sys
- led = 12
- GPIO.setmode(GPIO.BOARD)
- GPIO.setup(led, GPIO.OUT)
- while True:
- sys.stdout.write("on. ")
- sys.stdout.flush()
- GPIO.output(led, True)
- sleep(0.2)
- sys.stdout.write("off. ")
- sys.stdout.flush()
- GPIO.output(led, False)
- sleep(0.2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement