Hi, i am making a project that uses arduino and esp8266 connected via Serial unidirectional ESP TX --> Ard RX. For this project im using SoftwareSerial. If i send a long string, arduino miss some letters and i cant fix this problem.
The String that send ESP:
012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
The string that receive Arduino:
01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901235678912346789023456890234568901345689012356780123567801235678902345675679012356790123467801234678912346789023457890134568901345689012456780123567801235678912346789023457890234568902345679012456790123567901234678012346789023467890234578901345689013456790124567801235678012356789123467890234578901345689013456790124e67891235678
As you can see, Arduino miss some data.
Serial is configured at 38400baud.
The code that i use for sending data from ESP:
for (int i = 0; i < str.length(); ++i)
{
arduino_serial.write((char)str[i]);
}
The code that is use for receive data from arduino:
if (mySerial.available() > 0)
{
bufferr = mySerial.readString();
Serial.println(bufferr.c_str());
}
Last thing, the data sended from esp is fine.