Skip to content

Instantly share code, notes, and snippets.

@samister2k
Last active January 18, 2017 15:55
Show Gist options
  • Save samister2k/e14a03d93a4e9a893b8fbc66887be654 to your computer and use it in GitHub Desktop.
Save samister2k/e14a03d93a4e9a893b8fbc66887be654 to your computer and use it in GitHub Desktop.
import RPi.GPIO as GPIO
from time import sleep
GPIO.setmode(GPIO.BCM)
GPIO.setup(23, GPIO.OUT)
GPIO.setup(17, GPIO.OUT)
print("your motors are running ")
GPIO.output(23, GPIO.HIGH)
GPIO.output(17, GPIO.HIGH)
sleep(8)
GPIO.output(23, GPIO.LOW)
GPIO.output(17, GPIO.LOW)
GPIO.output(23, GPIO.HIGH)
sleep(5)
GPIO.output(23, GPIO.LOW)
GPIO.output(23, GPIO.HIGH)
GPIO.output(17, GPIO.HIGH)
sleep(8)
GPIO.output(17, GPIO.LOW)
GPIO.output(23, GPIO.LOW)
GPIO.cleanup()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment