Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. import serial #Import Serial Library
  2. arduinoSerialData =serial.Serial('com3',9600)
  3. y={"a":"hello","b":"How are you?"}
  4. while (1==1):
  5. if(arduinoSerialData.inWaiting()>0):
  6. myData=str(arduinoSerialData.readline())
  7. print y.get(myData,"error")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement