AbstractBeliefs

Untitled

Dec 20th, 2011
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.22 KB | None | 0 0
  1. import time
  2. import serial
  3.  
  4. conn = serial.Serial("/dev/ttyACM0", 9600)
  5. time.sleep(2)
  6.  
  7. conn.send('H')
  8.  
  9. while True:
  10.     try:
  11.         time.sleep(1)
  12.     except KeyboardInterrupt:
  13.         conn.close()
  14.         del conn
Advertisement
Add Comment
Please, Sign In to add comment