Hi all,
I come here because I have a weird problem.
I'm working on a project since 2 weeks about RS485 communication. For that I'm using the RS485.h library
also on my pro laptop as personal laptop with no problem.
Yesterday, I trie to install Visual Studio Code (from Microsoft) and install its Arduino Plugin.
I used it for 1 hour to try it out but finally was not totally happy with it and return on my Arduino IDE. I uninstalled VS Code.
But when I tried to open the Serial monitor to follow the Serial.print of my program, I had weird message, and I found that the baud rate that worked for my Serial monitor was not the baud rate I wrote in Serial.begin() but in RS485.begin() !
Here is the beginning of my code and it's enough to produces the bug:
[b]#include <RS485.h>[/b]
void setup() {
// Begin serial port
#include <RS485.h>
void setup() {
// Begin serial port
Serial.begin(9600);
// Begin RS485 port
RS485.begin(19200);
Serial.println("Let's Go !");
delay(2000);
}
void loop() {
}
Instead of "Let's Go" I have ⸮?⸮o⸮⸮
But when I switch the Monitor from 9600 to 19200 there is Let's Go.
Another point is if I write RS485.begin(19200) then Serial.begin(9600), then the Monitor display Let's Go at 9600 baud rate.
My Serial Monitor takes account of the last line with begin and doesn't care about Serial or RS485 before the begin...
Do you have an idea to fix it ?
(I'm on Win 10 64bits with Arduino IDE 1.8.13 and I'm working with UNO copy)