OBD9141 Mode 04 Clear Trouble Codes and MIL CEL

I’m using the OBD9141 library to get current PID data.

I would like to put the ECU in Mode 04 and clear any trouble codes. This will normally also clear the MIL/CEL.

Looking at https://en.wikipedia.org/wiki/OBD-II_PIDs#Mode_04 it seems that this should be pretty simple. It is just one command with no variables or anything getting returned.

Is this function part of this library and I just need to call it? Or is this a new feature to be added? It doesn’t seem like it would need to be more than a few lines of code.

I haven’t seen much discussion about clearing codes, especially using K-Line.

1 Like