stanleyhuangyc / ArduinoOBD

OBD-II library and sketches for Arduino
http://freematics.com
968 stars 519 forks source link

Read Vehicle Odometer with OBD2UART #58

Open preslavmihaylov opened 5 years ago

preslavmihaylov commented 5 years ago

I am interested in using the https://freematics.com/pages/products/freematics-obd-ii-uart-adapter-mk2/ and this library to read the vehicle odometer data.

According to OBD-II Protocol's wikipedia (https://en.wikipedia.org/wiki/OBD-II_PIDs), there is a pid for reading Odometer data (ID 0xA6).

However, this library's interface doesn't support it. I tried adding it manually and reading it while the car is running, but the device didn't receive any answer.

Perhaps there are some intricacies in reading the pid with the library and merely requesting the specified ID is not enough.

So, is it possible to read the Odometer data with this device with some tweaking of the library or is it not possible?

RootUser3885 commented 5 years ago

That also depends on if the car supports it. I haven't tried it but you can add your own PID to the library by modifying the files.