OBDII adaptor model A didnt work on I2C

Inquiry and support for Freematics products
Post Reply
FreeSun
Posts: 1
Joined: Mon Nov 10, 2014 10:00 am

OBDII adaptor model A didnt work on I2C

Post by FreeSun »

I just purchased OBD2 Adaptor Model A. I use my 2006 Lexus to do the test. I changed the code a lit bit. Turn on the PIN 13 if obd.init is passed. At least I know the odb initialization works. When I connect to TX/RX, I do see pin 13 turn on. However when I change it to A4(SDA) and A5(SCL) on UNO. It seems didn't work. Did I purchase the wrong adaptor for SDA/SCL connection. I do change the config from I2C to 1. The reason I want use SCL/SDA, I need use RX/TX for my serial monitor so I can print out some testing data.


Thanks,
Katherine

void setup()
{
// we'll use the debug LED as output
pinMode(13, OUTPUT);
// start communication with OBD-II UART adapter
obd.begin();
// initiate OBD-II connection until success
while (!obd.init());
}

void loop()
{
int value;
digitalWrite(13, HIGH);
//PID_RPM – Engine RPM (rpm)
//PID_ENGINE_LOAD – Calculated engine load (%)
//PID_COOLANT_TEMP – Engine coolant temperature (°C)
//PID_ENGINE_LOAD – Calculated Engine load (%)
//PID_ABSOLUTE_ENGINE_LOAD – Absolute Engine load (%)
//PID_TIMING_ADVANCE – Ignition timing advance (°)
//PID_ENGINE_OIL_TEMP – Engine oil temperature (°C)
//PID_ENGINE_TORQUE_PERCENTAGE – Engine torque percentage (%)
//PID_ENGINE_REF_TORQUE – Engine reference torque (Nm)

if (obd.read(PID_RPM, value)) {
// RPM is successfully read and its value stored in variable 'value'
// light on LED when RPM exceeds 3000
digitalWrite(13, value > 3000 ? HIGH : LOW);
delay(1000);
}
}
stanley
Site Admin
Posts: 1039
Joined: Sat Mar 01, 2014 3:15 am

Re: OBDII adaptor model A didnt work on I2C

Post by stanley »

If you are using model A, it connects via serial UART not I2C.
Post Reply