Skip to content

Instantly share code, notes, and snippets.

@j-mcc1993
Created June 27, 2014 05:56
Show Gist options
  • Save j-mcc1993/538ee3a62bcb61fc5f45 to your computer and use it in GitHub Desktop.
Save j-mcc1993/538ee3a62bcb61fc5f45 to your computer and use it in GitHub Desktop.
Testing out pySerial library to communicate serially with Arduino over USB.
import serial, time
ser = serial.Serial('/dev/cu.usbmodem411', 9600)
while True:
bin = bytes(chr(5), encoding = 'ascii')
print(bin)
ser.write(bin)
time.sleep(2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment