By dev.sultan
#5550
I used the below:
Library:
[url=https://github.com/stanleyhuangyc/ArduinoOBD/tree/master/libraries/OBD]https://github.com/stanleyhuangyc/ArduinoOBD/tree/master/libraries/OBD[/url]

ino code:

#include <Arduino.h>
#include <Wire.h>
#include <OBD.h>

COBD obd; /* for Model A (UART version) */

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

void loop()
{
  int value;
  // save engine RPM in variable 'value', return true on success
  if (obd.read(PID_RPM, value)) {
    // light on LED on Arduino board when the RPM exceeds 3000
    digitalWrite(13, value > 1000 ? HIGH : LOW);
   
  }
}

Cable:
[url=http://arduinodev.com/hardware/obd-kit/]http://arduinodev.com/hardware/obd-kit/[/url]

Wiring Connection:
Red: +5 Arduino
Black: Ground Arduino
Blue: TX Arduino side
Yellow: RX Arduino side

Test with below Cars:
2009 KIA Opima
1998 Ford Crown Victoria

i changed RPM in code from 3000 to 1000 and the same issue the LED 13 isn't be HIGH.

Gents, Please i need your support to solve this issue.
#5554
Ok thanks for your reply, sorry can you check if the below code is correct to check if it pass or not? thank you for usual support  :)

#include <Arduino.h>
#include <Wire.h>
#include <OBD.h>

COBD obd; /* for Model A (UART version) */

int led = 13;
int led2 = 12;

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

void loop()
{
  if (obd.init())
  {
  digitalWrite(led2, HIGH);  // turn the LED2 on (HIGH is the voltage level)
  delay(100);              // wait for a second
  digitalWrite(led2, LOW);    // turn the LED2 off by making the voltage LOW
  delay(100);
  }
  else
  {
  digitalWrite(led, HIGH);  // turn the LED on (HIGH is the voltage level)
  delay(100);              // wait for a second
  digitalWrite(led, LOW);    // turn the LED off by making the voltage LOW
  delay(100);
  }
}