Created
March 5, 2017 11:50
-
-
Save lattice0/0d848c78e6141e0e0f19f4346929f1d7 to your computer and use it in GitHub Desktop.
Echoes what is received in serial
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import serial | |
ser = serial.Serial('/dev/ttyACM0', 9600) | |
while 1: | |
serial_line = ser.readline() | |
print(str(serial_line).replace('\n', '')) | |
ser.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment