Last active
May 22, 2019 15:03
-
-
Save romilly/2d7ed765e119e215b4667b583456a09f to your computer and use it in GitHub Desktop.
Real and print lines from a serial input
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 | |
with serial.Serial('/dev/ttyACM0', 9600, timeout=10) as ser: | |
while True: | |
print(ser.readline()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment