Page 1 of 1

TOTAL NOVICE NEEDS HELP :)

Posted: Sun Feb 21, 2016 7:49 pm
by Daleyb93
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 :P
Cheers everyone,
D

Re: TOTAL NOVICE NEEDS HELP :)

Posted: Sun Mar 06, 2016 10:20 am
by stanley
Again, you can't use serial.print when using the UART adapter on UNO. UART means serial.

Re: TOTAL NOVICE NEEDS HELP :)

Posted: Tue Sep 27, 2016 9:24 am
by eraldino
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 :)

Posted: Tue Sep 27, 2016 9:46 am
by eraldino
Hey stanley if I use a mega where do i connect the RX TX of the OBD-II Adaptor?

Re: TOTAL NOVICE NEEDS HELP :)

Posted: Mon Oct 10, 2016 10:41 pm
by stanley
Connect to Rx1 and Tx1 on Arduino MEGA.