Last active
August 4, 2016 16:53
-
-
Save kuasha/132d6f696e330199dc81bcc2605b7ab4 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
""" | |
RPi - L273D | |
Pin 3 - Enable1 | |
Pin 5 - Input1 | |
Pin 7 - Input2 | |
- Output1 - Motor -VE | |
- Output2 - Motor +VE | |
""" | |
import RPi.GPIO as GPIO | |
sef setup(): | |
GPIO.setmode(GPIO.BOARD) | |
GPIO.setup(5,GPIO.OUT) | |
GPIO.setup(7,GPIO.OUT) | |
GPIO.setup(3,GPIO.OUT) | |
def forward(): | |
GPIO.output(5,False) | |
GPIO.output(7,True) | |
def backward(): | |
GPIO.output(5,True) | |
GPIO.output(7,False) | |
def enable(): | |
GPIO.output(3,True) | |
def disable(): | |
GPIO.output(3,False) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment