Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- when i add that if statement below the comment even
- though i never get a value above 20 the script
- prints one serial read and then stops
- import serial
- sys=serial.Serial('/dev/tty.usbmodemfa141',9600)
- while 1:
- value=sys.readline()
- print(value)
- #########################
- if value>20:
- break
Add Comment
Please, Sign In to add comment