Skip to content

Instantly share code, notes, and snippets.

@JoshAshby
Created June 15, 2009 21:54
Show Gist options
  • Save JoshAshby/130375 to your computer and use it in GitHub Desktop.
Save JoshAshby/130375 to your computer and use it in GitHub Desktop.
#!/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