Reading OBD(1) data from Toyota Corrola 1992 ....

Hi GadgetFreak,

I took your code and since my signal is not reversed and I'm using an UNO (I'm assuiming you are using DUO) I made the following changes in the code and added a 12K resistor between PIN-D2 with and ground (instead of the pull_up in the code).

#define ENGINE_DATA_PIN 2 // pin 2
#define ENGINE_DATA_INT 0 // for attachInterrupt
#define LED_PIN 13

// I have inverted the Eng line using an Opto-Coupler, if yours isn't then reverse these low & high defines.
#define MY_HIGH HIGH //LOW
#define MY_LOW LOW //HIGH

#define TOYOTA_MAX_BYTES 24
volatile uint8_t ToyotaNumBytes, ToyotaID;
volatile uint8_t ToyotaData[TOYOTA_MAX_BYTES];
volatile uint16_t ToyotaFailBit = 0;

void setup()
{
Serial.begin(115200);
Serial.print("system Started");
pinMode(ENGINE_DATA_PIN, INPUT); // _PULLUP
pinMode(LED_PIN, OUTPUT);
attachInterrupt(ENGINE_DATA_INT, ChangeState, CHANGE);
}

But the only result I get is "Fail 4 firtbit" ....

I know my code is a mess ... but it never failed me yet ... and I just came back from a 20 min ride with an OLD screen display and the speed + rpm were showing normal reading all the way :slight_smile:
M ycode might have glitches and points when it lose data - but none that I have seen so far - for example strange spike in the speed or rpm value ....

If you have any suggestion on how to get your code working on none-reverse I would love to hear and test them out on my system.

Thanks

ToyotaDataNewer.ino (3.49 KB)