Skip to content

Instantly share code, notes, and snippets.

Created February 25, 2014 03:43
Show Gist options
  • Save anonymous/9202259 to your computer and use it in GitHub Desktop.
Save anonymous/9202259 to your computer and use it in GitHub Desktop.
# std
import io
import time
# vendor
import serial
ser = serial.Serial('/dev/tty.usbserial-A6008sxN', 115200, timeout=1)
time.sleep(2)
sio = io.TextIOWrapper(io.BufferedRWPair(ser, ser))
sio.write(unicode("v"))
sio.flush()
print(sio.readline())
ser.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment