python 串口 serial 模块
import serial
ser= serial.Serial('/dev/ttyAMA0',9600)
ser.write('hello world'.encode('ascii'))
data_len = ser.inWaiting()
ser.read(data_len)
import serial
ser= serial.Serial('/dev/ttyAMA0',9600)
ser.write('hello world'.encode('ascii'))
data_len = ser.inWaiting()
ser.read(data_len)