Skip to content

Instantly share code, notes, and snippets.

@notthetup
Last active August 1, 2019 08:33
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 notthetup/c5dd331b96bf31ba9e61296945b81add to your computer and use it in GitHub Desktop.
Save notthetup/c5dd331b96bf31ba9e61296945b81add to your computer and use it in GitHub Desktop.
import serial
import time
ser = serial.Serial('/dev/ttyTHS1', 460800)
ser.reset_input_buffer(); ser.write(b'0'); line = ser.readline(); time.sleep(0.1); ser.write(b'y'); line = ser.readline(); print int(line[4:],16)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment