Alternative I/O pins?
Posted: Sun Aug 31, 2014 2:08 am
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");
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");