Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

OBD-II serial module for reading engine data

License

NotificationsYou must be signed in to change notification settings

brendan-w/python-OBD

 
 

Repository files navigation

A python module for handling realtime sensor data from OBD-II vehicleports. Works with ELM327 OBD-II adapters, and is fit for the RaspberryPi.

Installation

$ pip install obd

Basic Usage

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

Documentation

Available atpython-obd.readthedocs.org

Commands

Here are a handful of the supported commands (sensors). For a full list, seethe docs

note: support for these commands will vary from car to car

  • Calculated Engine Load
  • Engine Coolant Temperature
  • Fuel Pressure
  • Intake Manifold Pressure
  • Engine RPM
  • Vehicle Speed
  • Timing Advance
  • Intake Air Temp
  • Air Flow Rate (MAF)
  • Throttle Position
  • Engine Run Time
  • Fuel Level Input
  • Number of warm-ups since codes cleared
  • Barometric Pressure
  • Ambient air temperature
  • Commanded throttle actuator
  • Time run with MIL on
  • Time since trouble codes cleared
  • Hybrid battery pack remaining life
  • Engine fuel rate
  • Vehicle Identification Number (VIN)

Common Issues

Bluetooth OBD-II Adapters

There are sometimes connection issues when using a Bluetooth OBD-II adapter with some devices (the Raspberry Pi is a common problem). This can be fixed by setting the following arguments when setting up the connection:

fast=False,timeout=30

License

GNU GPL v2

This library is forked from:

Enjoy and drive safe!

About

OBD-II serial module for reading engine data

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python100.0%

[8]ページ先頭

©2009-2025 Movatter.jp