Skip to content

Instantly share code, notes, and snippets.

@ryanvade
Created August 3, 2017 01:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryanvade/573ef22c2d68c420b4b207f544643821 to your computer and use it in GitHub Desktop.
Save ryanvade/573ef22c2d68c420b4b207f544643821 to your computer and use it in GitHub Desktop.
con = serial.Serial("/dev/ttyACM0", 9600)
con.write(b'ohai')
waiting = con.in_waiting
response = con.read(waiting)
print(response)
con.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment