Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- try:
- from time import sleep
- import os
- import RPi.GPIO as GPIO
- GPIO.setmode(GPIO.BCM)
- GPIO.setup(12, GPIO.OUT)
- GPIO.setup(9, GPIO.OUT)
- GPIO.output(9,GPIO.LOW)
- GPIO.output(12,GPIO.LOW)
- while True:
- GPIO.output(9,GPIO.LOW)
- GPIO.output(12,GPIO.LOW)
- sleep(1)
- GPIO.output(9,GPIO.HIGH)
- GPIO.output(12,GPIO.HIGH)
- sleep(1)
- except KeyboardInterrupt:
- GPIO.Cleanup()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement