Guest User

Untitled

a guest
Dec 11th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. when i add that if statement below the comment even
  2. though i never get a value above 20 the script
  3. prints one serial read and then stops
  4.  
  5. import serial
  6.  
  7. sys=serial.Serial('/dev/tty.usbmodemfa141',9600)
  8.  
  9. while 1:
  10. value=sys.readline()
  11. print(value)
  12.  
  13. #########################
  14.  
  15. if value>20:
  16. break
Add Comment
Please, Sign In to add comment