Skip to content

Instantly share code, notes, and snippets.

@altanhaligur
Last active July 6, 2019 21:21
Show Gist options
  • Save altanhaligur/86fb61c5fdac00b656c44f592204234c to your computer and use it in GitHub Desktop.
Save altanhaligur/86fb61c5fdac00b656c44f592204234c to your computer and use it in GitHub Desktop.
import serial
import RPi.GPIO as GPIO
import time
ser = serial.Serial("/dev/ttyUSB0", 9600)
ser.baudrate = 9600
while True:
read_ser = ser.readline()
a = int(read_ser)
print a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment