logo elektroda
logo elektroda
X
logo elektroda

ESP-01 (ESP8266) and Arduino Mega, Lag when receiving more data

Kacper1263 633 2
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 17671466
    Kacper1263
    Level 2  
    Welcome,

    I've been trying to solve a problem with an ESP-01 module hooked up to an Arduino Mega for a while now. Namely, when I send data via the MQTT server to the ESP e.g. from my phone and I send too much of this data between 1 and 5 seconds, the whole program stops responding to further data for the next 20-40 seconds or the Arduino restarts.

    The program is somehow not super complicated (as it was only used for me to test the ESP) so I think it won't be difficult to understand.

    The module is connected to the Arduino via a logic level converter. I don't think the connection will be a problem, as sending data works without a problem, and when data is sent to the ESP at 1-2 s intervals everything works without a problem.


    Code: C / C++
    Log in, to see the code
    .

    Thanks in advance for your help!
  • ADVERTISEMENT
  • #2 17671605
    khoam
    Level 42  
    You can try increasing the size of the buffers for Serial in Mega:
    Code: Bash
    Log in, to see the code
    .
  • #3 17672723
    Kacper1263
    Level 2  
    Unfortunately this did not help :( .
ADVERTISEMENT