Hi,
I'm currently trying to connect two Arduino Uno boards using software serial. I've looked over various example sketches and while I can see that it's possible I have seen no coherent solutions. I have been gradually scaling down what I am attempting to do and now am focused on simply sending a character.
Here is the code for the board sending the character:
#include <SoftwareSerial.h>
SoftwareSerial SerialSend(11, 10); //RX, TX
void setup() {
Serial.begin(9600);
SerialSend.begin(9600);
}
void loop() {
SerialSend.write("h");
delay(1000);
}
And here is the receiver code:
#include <SoftwareSerial.h>
SoftwareSerial mySerial(10, 11); //RX, TX
void setup() {
Serial.begin(9600);
mySerial.begin(9600);
mySerial.listen();
}
void loop() {
char c = mySerial.read();
Serial.println(c);
delay(500);
}
The receiving board displays a weird character (ASCII code 255) in the Serial monitor.
Am I seriously underestimating the amount of work that needs to be put in to make this work or am I getting something simple wrong?
Thanks in advance.