DTC codes aren't P0xxx.

Inquiry and support for Freematics products
protomor
Posts: 99
Joined: Wed Oct 14, 2015 9:17 am

DTC codes aren't P0xxx.

Postby protomor » Mon Feb 20, 2017 6:50 am

So the code I have to consume Stanley's DTC read is:
unsigned int numberofcodes = obd.getDTCCount();
lcd.println(numberofcodes);

if (numberofcodes > 0)
{
uint16_t codes[8];
byte dtcCount = obd.readDTC(codes, numberofcodes);
if (dtcCount == 0) {
lcd.println("No DTC");
}
else
{
for (byte i = 0; i < numberofcodes; i++)
{
lcd.println(codes[i]);
}
}
}


But I get 20484 and 16896 instead of the P codes. How do I convert this into one of the P codes?

protomor
Posts: 99
Joined: Wed Oct 14, 2015 9:17 am

Re: DTC codes aren't P0xxx.

Postby protomor » Sat Feb 25, 2017 12:28 pm

Staaaaaanleeeeeeeey HAAALP!

stanley
Site Admin
Posts: 560
Joined: Sat Mar 01, 2014 3:15 am

Re: DTC codes aren't P0xxx.

Postby stanley » Wed Mar 15, 2017 11:54 am

Convert it to HEX.

Serial.println(code[i], HEX);

There is no P as all readable codes are for P (powertrain).

protomor
Posts: 99
Joined: Wed Oct 14, 2015 9:17 am

Re: DTC codes aren't P0xxx.

Postby protomor » Wed Mar 15, 2017 10:13 pm

I thought I tried that but I'll give it another go.


Return to “Freematics Products”

Who is online

Users browsing this forum: Bing [Bot] and 1 guest