![]() ![]() Obd.scan_serial # util function for manually scanning for OBD adapters Obd.OBDStatus # enum for connection status Obd.Unit # unit tables (a Pint UnitRegistry) Obd.Async # asynchronous OBD connection class The query() function will return a response object with parsed data in its value property. The commands themselves are represented as objects, and can be looked up by name or value in obd.commands. In python-OBD, this is done with the query() function. To retrieve data from the car, you must send commands that query for the data you want (e.g. OBD connections operate in a request-reply fashion. Print(("mph")) # user-friendly unit conversions Print(response.value) # returns unit-bearing values thanks to Pint ![]() Response = connection.query(cmd) # send the command, and parse the response On Debian-based systems, this usually means installing the following packages: $ sudo apt-get install bluetooth bluez-utils bluemanĬonnection = obd.OBD() # auto-connects to USB or RF portĬmd = # select an OBD command (sensor) Note: If you are using a Bluetooth adapter on Linux, you may also need to install and configure your Bluetooth stack. Install the latest release from pypi: $ pip install obd Consult the GitHub release page for changelogs before updating. NOTE: Python-OBD is below 1.0.0, meaning the API may change between minor versions. This library is designed to work with standard ELM327 OBD-II adapters. It can stream real time sensor data, perform diagnostics (such as reading check-engine codes), and is fit for the Raspberry Pi. Python-OBD is a library for handling data from a car's On- Board Diagnostics port (OBD-II). ![]()
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |