TOTAL NOVICE NEEDS HELP :)
Posted: Sun Feb 21, 2016 7:49 pm
Hi Guys & Girls,
I received my OBD-II UART adapter recently and I've been trying to get some very simple information out of it with no luck
The first thing I managed to do was get the rpm test LED working, but I've been now trying to read and output the actual RPM to the Serial Monitor on my computer to see if what I'm doing is working... Im having no luck aside from receiving a load of "?? ? ? ?? ?" etc..
I read that using Serial.print() will disrupt the OBD adapter, so how can I possibly receive data to the serial monitor?
If anyone can help me with the code, that would be great, so far i have this..
___________
#include <Arduino.h>
#include <Wire.h>
#include <OBD.h>
COBD obd;
void setup()
{
Serial.begin(38400);
// 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 rpm;
if (obd.read(PID_RPM, rpm)) {
// RPM is successfully read and its value stored in variable 'rpm'
Serial.println(rpm);
}
}
___________
any help would be MUCH appreciated, I'm a total noob and this is holding me back on my ambitions to read PIDs on my car
Cheers everyone,
D
I received my OBD-II UART adapter recently and I've been trying to get some very simple information out of it with no luck
The first thing I managed to do was get the rpm test LED working, but I've been now trying to read and output the actual RPM to the Serial Monitor on my computer to see if what I'm doing is working... Im having no luck aside from receiving a load of "?? ? ? ?? ?" etc..
I read that using Serial.print() will disrupt the OBD adapter, so how can I possibly receive data to the serial monitor?
If anyone can help me with the code, that would be great, so far i have this..
___________
#include <Arduino.h>
#include <Wire.h>
#include <OBD.h>
COBD obd;
void setup()
{
Serial.begin(38400);
// 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 rpm;
if (obd.read(PID_RPM, rpm)) {
// RPM is successfully read and its value stored in variable 'rpm'
Serial.println(rpm);
}
}
___________
any help would be MUCH appreciated, I'm a total noob and this is holding me back on my ambitions to read PIDs on my car
Cheers everyone,
D