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
TOTAL NOVICE NEEDS HELP :)
Re: TOTAL NOVICE NEEDS HELP :)
Again, you can't use serial.print when using the UART adapter on UNO. UART means serial.
Re: TOTAL NOVICE NEEDS HELP :)
stanley wrote:Again, you can't use serial.print when using the UART adapter on UNO. UART means serial.
Hello stanley, I see that when using UART adapter the Serial.print will not work on the UNO. Will this work if I use an Arduino Leonardo or Micro? I will put the RX TX of the UART Adaptor in Serial1 of the Leonardo/Micro then I can probably output a Serial data?
Re: TOTAL NOVICE NEEDS HELP :)
Hey stanley if I use a mega where do i connect the RX TX of the OBD-II Adaptor?
Re: TOTAL NOVICE NEEDS HELP :)
Connect to Rx1 and Tx1 on Arduino MEGA.