Skip to content

Instantly share code, notes, and snippets.

@rhaleblian
Last active May 15, 2020 14:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rhaleblian/ba3d8de32884d455a821187212074df6 to your computer and use it in GitHub Desktop.
Save rhaleblian/ba3d8de32884d455a821187212074df6 to your computer and use it in GitHub Desktop.
Basic pyserial test.
import serial
ser = serial.Serial('/dev/ttyACM0') # open serial port
print(ser.name) # check which port was really used
buf = ser.read(6)
print buf
ser.close() # close port
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment