- Thu Jan 16, 2014 9:26 am
#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.
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.