Diagnostic Trouble Codes
Posted: Tue Aug 02, 2016 6:41 pm
I use Freematics ONE to develop my app using Arduino. I try to read DTC Codes, the code is like this:
bytesReceived is greater than zero and buffer is "$OBD41 01 81 04 00 00"
Why the first byte response start with "$OBD"?
Do you have sample code for retrieving DTC Codes?
Thanks
Code: Select all
char buffer[64];
write("0101\r");
int bytesReceived = receive(buffer,sizeof(buffer),1000);
buffer[bytesReceived+1] = 0;
if (bytesReceived > 0) {
Serial.println(buffer);
}
bytesReceived is greater than zero and buffer is "$OBD41 01 81 04 00 00"
Why the first byte response start with "$OBD"?
Do you have sample code for retrieving DTC Codes?
Thanks