I recently purchased the A version 1.2 UART Adapter, and decided to try just the simple RPM test (,As i am new to the OBD-2, but familiar with Arduino) that blinks the LED pin 13 above 3000 RPM. I loaded the sample code on both a UNO and Mega boards with no luck, I even tried to write the output to the serial port to watch it but it only give an ASCII character.
The Web Page shows TX as yellow, and RX as Blue, however my UART unit has Yellow and White, (I assume the white is RX). (I have tried swapping TX and RX just to be sure)
Any Ideas on why I get no communications ?, I do see Internal Light activity in the OBD 2 unit. I am trying this on a 1997 Ford Ranger.
Thanks
Code I am trying:
/*************************************************************************
* Sample sketch based on OBD-II library for Arduino
* Distributed under GPL v2.0
* Visit http://freematics.com for more information
* (C)2012-2014 Stanley Huang <stanleyhuangyc@gmail.com>
*************************************************************************/
#include <Arduino.h>
#include <Wire.h>
#include <OBD.h>
COBD obd;
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;
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);
}
}
OBD-2 UART no responses
Re: OBD-2 UART no responses
1997 ford is quite unlikely to be supported.
Re: OBD-2 UART no responses
Ok, Thanks, I will try it on our 2006 Chevy......
Re: OBD-2 UART no responses
Let us know the result.
Re: OBD-2 UART no responses
Do you have an USBasp? There will be no serial port when you use a USBasp programmer. You need to set programmer in Arduino IDE's menu. If not, you need to use another Arduino with Arduino ISP sketch do uploading.
kathi