Open m42u opened 1 year ago
Hmmm... I have no idea what could be the problem
Hi
The exception says "OOM": Out Of Memory. MQTT tries to allocate memory from heap and fails.
I do not fully understand the influence of using multiple fonts. Maybe they are not used out of flash (PROGMEM). ESP32 has enough RAM for full buffered display with GxEPD2 for the smaller e-paper displays. But it may not leave enough for MTQQ. You can reduce memory use of GxEPD2 by reducing the page height, e.g. with GxEPD2_290_T94::HEIGHT / 2.
Hi @ZinggJM
Thanks, I'm now able to use a second font... but not a third one 😞
I tried / 4
, / 6
and even / 8
but no luck. Any other ideas?
By the way, what's the impact of reducing this number?
Edit:
Well, it only works with certain fonts.
u8g2_font_logisoso58_tf
+ u8g2_font_logisoso20_tf
= working
u8g2_font_logisoso58_tf
+ u8g2_font_logisoso38_tf
= failing with the OOM error
Edit 2:
Since I only need to display numbers, I switched to _tn
versions of fonts because they took much less space compared to _tf
ones.
Thanks!
Hi guys!
I'm trying to use this project to display temperature and humidity value on a Waveshare ePaper display using a DHT22. I'm able to display some text using the
print
function after having chosen the font usingsetFont
. Basically, this is working fine:However, if I change the font using the
setFont
function, I got a "User exception (panic/abort/assert)".Stack trace:
The strange thing is that I got this exception before reaching this function call. It happens when connecting to a MQTTS endpoint (this happens before the
display.init()
function call). I'm using the Adafruit MQTT library. If I do not connect to the MQTTS endpoint, the code is working fine, even with multiplesetFont
function calls.Is there a way to use multiple fonts without facing this issue?
Thanks!