Pyserial 모듈 설치

$ pip install pyserial

code

import serial
 
ser = serial.Serial("/dev/ttyACM0", 9600) # Serial("port name",baudrate)

while True: 
		response = ser.readline()

		print(response[:len(response)-1].decode())