You will find my code and the strange symbol.
Please if you have any suggestion tell me.
Thank you in advance.
You will find my code and the strange symbol.
Please if you have any suggestion tell me.
Thank you in advance.
Because software serial doesn't work very well at 115200bps?
Please remember to use code tags when posting code
Did the ESP32 have two-and-a-half serial port ? Try a hardware serial port.
Maybe the sketch is correct and that code is indeed received ?
Do you know that if the mySerial.readString() function times out, does it return a valid string ? I don't know, that's why I don't use that function.
You don't need the String object:
if( mySerial.available() > 0)
{
int inChar = mySerial.read();
Serial.write( (byte) inChar);
}
Is this garbled text random or consistent? If random then it could be a physical connection or wiring issue. If wiring is good then try a slower baud setting and the handshaking scheme - on windows, I believe the default is "None" - try changing that and see if it helps.
As previously stated, softwareserial is known to be unreliable to completely unusable at higher baud rates. Softwareserial uses interrupts, and another interrupt occurring in mid-character can cause incorrect results.
Don't let the sketch name fool you, it is running on an Uno.
Thank you very much for your suggestion you are right I change the baud rate from 115200 to 9600 and everything works perfectly.
Hi, everyone I like to thank you for all your suggestions. The real problem was the baud rate 115200.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.