Skip to content

Instantly share code, notes, and snippets.

@bensonk
Created July 24, 2011 18:30
Show Gist options
  • Select an option

  • Save bensonk/1102915 to your computer and use it in GitHub Desktop.

Select an option

Save bensonk/1102915 to your computer and use it in GitHub Desktop.
Gist action
#!/usr/bin/env python
import serial, time
ser = serial.Serial('/dev/tty.usbserial-FTFB009M', 9600, timeout=1)
while True:
for val in [ "0", "a", "c", "g", "o" ]:
ser.write(val)
for i in range(5):
print ser.readline(),
time.sleep(0.300)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment