Teensy 3.5 and Freematics device

Status
Not open for further replies.

crazybenn

New member
I can run the exemple Code I got with the OBD library if I use a MEGA or UNO. But for a reason i don't get yet, the Arduino IDE wont compile if i choose Teensy 3.5
the only parts that seems to not working, is the one that suppose to read the DTC

... this parts...


unsigned int codes[6];
byte dtcCount = obd.readDTC(codes, 6); // this line is over surlined
if (dtcCount == 0) {
mySerial.println("No DTC");
} else {
mySerial.print(dtcCount);
mySerial.print(" DTC:");
for (byte n = 0; n < dtcCount; n++) {
mySerial.print(' ');
mySerial.print(codes[n], HEX);
}
mySerial.println();
}
delay(5000);


and it return me this:
//
no matching function for call to 'COBD::readDTC(unsigned int[6], int)'
//

all the other function i try with Teensy and Freematic works good but not this one
anybody can help???
thanks
 
On the teensy family, an int is 32 bits. Did you try changing the declaration of codes to uint16_t to match the hardware?
 
On the teensy family, an int is 32 bits. Did you try changing the declaration of codes to uint16_t to match the hardware?

no, and Im just mid-level "beginer" who really want to learn...
you mean:
unit16_t codes[6];

instead of?

unsigned int codes[6];
 
bad typing sorry.... but thanks;) already try this... it compile... nobug! will test in the car tomorrow... thanks you
 
Status
Not open for further replies.
Back
Top