串行模块,用于处理来自车辆OBD-II端口的实时传感器数据
obd的Python项目详细描述
python obd
用于处理obd-ii车辆实时传感器数据的python模块 港口适用于ELM327 OBD-II适配器,适合覆盆子 圆周率。
安装
$ pip install obd
基本用法
importobdconnection=obd.OBD()# auto-connects to USB or RF portcmd=obd.commands.SPEED# select an OBD command (sensor)response=connection.query(cmd)# send the command, and parse the responseprint(response.value)# returns unit-bearing values thanks to Pintprint(response.value.to("mph"))# user-friendly unit conversions
文件
命令
下面是一些支持的命令(传感器)。有关完整列表,请参见the docs
注意:对这些命令的支持将因车辆而异
GNU GPL v2 此库从以下位置派生: 享受安全驾驶!许可证
推荐PyPI第三方库