$ pip install pyserial
import serial ser = serial.Serial("/dev/ttyACM0", 9600) # Serial("port name",baudrate) while True: response = ser.readline() print(response[:len(response)-1].decode())