0

I am using different codes which set different values of baud rate through the Serial.begin() function.

I have an Uno using Serial.begin(9600) connected to an ESP8266 ESP-01 module

SoftwareSerial WiFiBoard(2, 3);
WiFiBoard.begin(115200)

Both of them are printing and reading from Serial, but when I use Arduino IDE Serial Monitor, I'm only able to display the content of the 9600... Am I missing a setting somewhere?

Also, when I configure both of them to use the baud rate 9600, I still only see the Uno information

8
  • 1
    You can't have two different baud rates on the same serial connection. That is illogical. – Majenko Sep 24 '20 at 13:52
  • My understanding is that by using the SoftwareSerial library, a new Serial connection is used – Alucard Sep 24 '20 at 13:53
  • 1
    That is a completely separate serial connection. Nothing at all to do with the serial monitor. – Majenko Sep 24 '20 at 13:55
  • 1
    Your PC only sees what the Arduino sends through Serial. If you want it to see something from somewhere else then you have to actively read that data from that "other place" and send it to your PC through Serial. – Majenko Sep 24 '20 at 14:05
  • 1
    In short, yes. Better: while (WiFiBoard.available()) { Serial.write(WiFiBoard.read()); } – Majenko Sep 24 '20 at 14:13
2

Your computer can not see what is going over the WiFiBoard serial connection because that connection has nothing at all to do with the connection to your computer.

If you want your computer to see what is being received on that port you must read the data from that port then send it to your computer.

It doesn't (much) matter about the difference in baud rates (only that if one sends too much data too fast for the other to forward it you will lose some data).

It's common to use something like:

while (WiFiBoard.available()) {
    Serial.write(WiFiBoard.read());
}

That will forward anything received from the WiFi board over the serial port to the computer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.