engine-software/comms/Prev/communication/RaspberrySerialReader.py
2022-08-07 14:39:16 -04:00

9 lines
283 B
Python

#!/usr/bin/env python3
import serial
if __name__ == '__main__':
ser = serial.Serial('/dev/tty.usbserial-01BE27D0', 115200, timeout=1)
ser.flush()
while True:
if ser.in_waiting > 0:
line = ser.readline().decode('utf-8').rstrip()
print(line)