Last active
January 19, 2017 15:14
-
-
Save michaeltennant4554/3a5b8d8c0b7c18d667a35f9d80faf896 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import RPi.GPIO as GPIO #this puts the GPIO in the program always has to be first. | |
sleep (5) #this stops the pi from doing something straight away and makes it wait. | |
GPIO.setmode(GPIO.BCM) #sets the mide of the pi to Bcm this is always the second. | |
GPIO.setup(17,GPIO.OUT) #TELLS THE pi that u what number on the GPIO you will be useing. | |
GPIO.setup(23,GPIO.OUT | |
GPIO.setup(24,GPIO.OUT) | |
GPIO.setup(27,GPIO.OUT) | |
GPIO.output(23,GPIO.HIGH #turns the pi on | |
GPIO.output(24,GPIO.HIGH | |
GPIO.output(27,GPIO.HIGH | |
GPIO.output(17,GPIO.HIGH | |
GPIO.output(23,GPIO.LOW) #turns it off | |
GPIO.output(24,GPIO.LOW) | |
GPIO.output(27,GPIO.LOW) | |
GPIO.output(17,GPIO.LOW) | |
def motars(): | |
print("THIS SHOULD WORK") | |
GPIO.cleanup() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment