Closed fulcrumEFX closed 6 years ago
Sending a HTTPS requests uses a huge amount of memory compared to Serial Print. I suspect you are running out of memory.
Explanation of memory here and some suggestions on how to reduce it: https://learn.adafruit.com/memories-of-an-arduino/optimizing-sram
I'm using the code provided by Bosch and just expanded it. The problem is that I don't really understand the provided example so I'm not sure what I can cut.
But since the sketch already uses 51% of memory for global variables the lack of memory is probably the cause. I'll look into it when I find the time, thanks.
I have a problem where every few minutes my ESP8266 does a soft wdt reset while trying to send a Telegram message (sensor data). The sendMessage is called from within a function of the sensor lib, I tried calling yield() to reset wdt just before sending the message but it doesn't help.
The code that sends the message (it works 90% of the time):
Serial output:
followed by stack dump.
I can't figure out where the problem is. If I change
bot.sendMessage(CHAT_ID, buffer, "");
toSerial.println(buffer)
wdt never causes a reset.