Created
June 15, 2009 21:54
-
-
Save JoshAshby/130375 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
#!/usr/bin/env python | |
import serial | |
usbport = '/dev/ttyUSB0' | |
ser = serial.Serial(usbport, 9600, timeout=1) | |
def move(servo, angle): | |
ser.write(chr(255)) | |
ser.write(chr(servo)) | |
ser.write(chr(angle)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment