通过串行端口与Arduino通话的模块
linx-connection的Python项目详细描述
安装:
pip install --user linx_connection
用法:
conn = LinxConnection(port='\<port>') # \<port> can be /dev/ttyUSBX if you are running on Linux or COMX if Windows
dct = conn.AnalogRead(1) # -> {..., 'data': \<data>, ...} where \<data> is bytes object representing status of A1 port. Use transfrom(dct) to get normal int value