Hello Everyone,
I have been having trouble with talking to a GPRS with my arduino uno so I decided to try some debugging
on the softwareserial.
Using the following test code (with pin 5 connected to 8 and 7 connected to 6:
#include <SoftwareSerial.h>
SoftwareSerial mySerial(7,8);
SoftwareSerial mySerial2(5,6);
void setup() {
mySerial.begin(19200); // the GPRS baud rate
mySerial2.begin(19200); // the GPRS baud rate
Serial.begin(19200); // the GPRS baud rate
}
void loop() {
int x;
char d;
if(Serial.available())
{
Serial.print("Got data puttin on serial\n");
d = Serial.read();
Serial.print("read in d =");
Serial.print(d);
x = mySerial.print((char)d);
mySerial.print("\n");
Serial.println("tried to writ to mySerial x =");
Serial.print(x);
}
mySerial.listen();
if(mySerial.available())
{
Serial.print("S1-");
Serial.print((char)mySerial.read());
}
mySerial2.listen();
if(mySerial2.available())
{
Serial.print("S2-");
Serial.print((char)mySerial2.read());
}
}
I can type anything and it gets read in but I never see the
S1 or S2 code.
Do you think I have a bad board?
Does the SoftwareSerial work with arduino uno and software Arduino 1.0?
Thanks,
Kevin