#!/usr/bin/env python
import RPi.GPIO as gpio
import time
import sys
import warnings
warnings.filterwarnings('ignore')
LEFT_PIN = 17
RGHT_PIN = 4
if __name__ == '__main__': # Program start from here
gpio.setmode(gpio.BCM)
gpio.setup(LEFT_PIN, gpio.OUT)
gpio.setup(RGHT_PIN, gpio.OUT)
try:
while True:
gpio.output(LEFT_PIN, True)
gpio.output(RGHT_PIN, False)
time.sleep(3)
gpio.output(LEFT_PIN, False)
gpio.output(RGHT_PIN, False)
time.sleep(3)
gpio.output(LEFT_PIN, False)
gpio.output(RGHT_PIN, True)
time.sleep(3)
gpio.output(LEFT_PIN, False)
gpio.output(RGHT_PIN, False)
time.sleep(3)http://jjmoak2.iwinv.net/wp/wp-admin/post-new.php#
except KeyboardInterrupt: # When 'Ctrl+C' is pressed, the child program destroy() will be executed.
gpio.cleanup() # Release resource
sys.exit()