Skip to content

Instantly share code, notes, and snippets.

@ryo1kato
Created February 25, 2017 19:00
Show Gist options
  • Select an option

  • Save ryo1kato/5212a2739b301f8b98f944ad97e9b33f to your computer and use it in GitHub Desktop.

Select an option

Save ryo1kato/5212a2739b301f8b98f944ad97e9b33f to your computer and use it in GitHub Desktop.
UART read/write with Arduino using pyserial
ser = serial.Serial(port='/dev/tty.wchusbserial1420',
baudrate=115200,
stopbits=serial.STOPBITS_ONE,
bytesize=serial.EIGHTBITS)
ser.write("string");
ser.read(99)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment