Page 1 of 1

Alternative I/O pins?

Posted: Sun Aug 31, 2014 2:08 am
by rgunter
I would like to keep the option of reading and communicating with my Arduino using the Serial monitor and that uses digital 0 and 1 pins. The OBDII adapter also uses these Rx Tx pins, so I can't be plugged in and use Serial communication at the same time. It is also my understanding that I can reset analog pins to act as digital pins.

Question #1:
I am trying to redesignate A4 A5 as TX RX for the OBD module using SoftwareSerial. Is this even possible or am I just a total newb? (I am actually a total newb either way.) I found that my UART model A does not have a modifiable baudrate and the OBD.h file made it seem the baudrate was set to 0 (38400 for the I2C model B). I have never heard of this. I thought it only went down to 300?

Question #2:
Even when my program successfully connects the serial port, it fails at obd.init() initialization. I don't know where to go from here. I am new to all of this and the code in .cpp describing init() is beyond me. Any way to modify this?

Here is the applicable bit of my code:

const int OBD_RX = A5; // Connect A5 to OBDII module TX - Yellow
const int OBD_TX = A4; // Connect A4 to OBDII module RX - White

SoftwareSerial obdSS(OBD_RX, OBD_TX);

COBD obd;

Serial.println("Initializing OBD Connection...");
delay(500);
obdSS.begin(0);
while(!obd.init());
Serial.println("OBD Connection Initialized");

Re: Alternative I/O pins?

Posted: Tue Sep 02, 2014 1:35 pm
by stanley
Using SoftwareSerial over 38400bps can cause loss of data. In your case, simply use an Arduino MEGA which has 4 hardware serial UARTs. If MEGA 2560 is too big for you, check out this:
http://freematics.com/store/index.php?r ... duct_id=59

Re: Alternative I/O pins?

Posted: Thu Oct 16, 2014 5:19 am
by dexter
Dear friends,

I would like to use software serial like rgunter, do you think it's is possible to do that at only 9600 bps ? i have only one data to view, i don't need high baud rate but i can't use hardware serial.

what can i modify in the code ? i have tested the code in this post but he don't work.

many thanks

Chris from Paris (France)