Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read stored DTC and clear MIL #5

Open
pniewiadowski opened this issue Mar 2, 2020 · 3 comments
Open

Read stored DTC and clear MIL #5

pniewiadowski opened this issue Mar 2, 2020 · 3 comments

Comments

@pniewiadowski
Copy link

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?

@dsbilling
Copy link

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

@JasonJoyner01
Copy link
Contributor

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))

@s89281b
Copy link

s89281b commented Jul 12, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants