Forum >Replies by r0tor
Replies (3)
  • You Reply: if (obd.read(PID_SPEED, [b]kph[/b])){ digitalWrite(13, [b]vel[/b] = 0 ? HIGH : LOW); digitalWrite(A0, [b]vel[/b] >= 100 ? HIGH : LOW);


    Gotta pick either kph or vel as your variable
  • You Reply: Any example of how to deal with a PID that contains 2 or 4 data bytes?  Like a wideband O2 (PID 24) has 4 bytes - first 2 are used to calculate the lambda value and the other 2 calculate the voltage value.

    It looks like you have the OBD mode hard coded as a "1" in the library.  I changed it to a "22" for my mode 22 PID and seemed to get a response that made sense.  However, I think there are 4 bytes for this PID and I'm not sure how to get bytes 2-4.


    BTW - I found an error with your PID for coolant temp in the library... needs to use getTemperatureValue(data) instead of getSmallValue(data)

  • You Reply: BUMP

    If its not possible to easily add these to the library - could I get a brief example of how to directly query the CAN system with the PID codes and retrieve the data  from my project?