arduino-OBD2 icon indicating copy to clipboard operation
arduino-OBD2 copied to clipboard

Read stored DTC and clear MIL

Open pniewiadowski opened this issue 4 years ago • 3 comments

Hi,

first of all thank you for this library!

Don't know if creating an issue is the right way, but I wasn't able to figure out how to use the OBD2 library to read all the stored DTC codes and then try to clear them which result turning off the MIL light

Are you able to help?

pniewiadowski avatar Mar 02 '20 20:03 pniewiadowski

Thats really dependant on the make and model of the car.

dsbilling avatar Dec 15 '20 14:12 dsbilling

Thats really dependant on the make and model of the car.

You should be able to receive the DTC codes according to the OBDII standard if you send a message using mode 3, without a PID included. Clearing the DTCs is done the same way, except by sending a message with mode 4.

https://en.wikipedia.org/wiki/OBD-II_PIDs#Service_03

https://en.wikipedia.org/wiki/OBD-II_PIDs#Service_04

However, you cannot do this with the arduino-OBD2 library as written. You'd need to reimplement the pidRead private function in your code using the underlying arduino-CAN library.

Something like: pidRead(0x03, pid not needed, data, sizeof(data))

JasonJoyner01 avatar Jan 14 '21 03:01 JasonJoyner01

Thank you for this library. It has been a great help to me in my trying to learn how to use arduino in my car. I see that clear dtc function has been added to the library but It is not called out in any of the examples. Can you point me in the right direction as to where I need to insert in example.

s89281b avatar Jul 12 '21 11:07 s89281b