I found this library on GitHub addressing the ELM327 functionality but I'm not sure if it hasn't already been implemented in the Freematics code.
Does anyone have sample code for retrieving - and resetting - DTCs? I know it's Mode 3 and returns 6 bytes to request but not sure of the syntax to put in the loop.
Thanks.
Edit: While you're thinking about that, more questions...
I found out this is the sequence I'm supposed to write;
01 01 (Returns 41 xx where xx is the number of codes)
03 (Returns ALL the codes in a 6-byte string, one for each code)
and when done...
04 (Reset)
So will this work? (Sorry I don't have my device yet, I can't just test it)
Code: Select all
obd.write("01 01");
int numResult = obd.receive(&buffer,1000); // presumably I will have initialized buffer elsewhere
I'm not sure how to initialize the unit yet, either.