ThingPulse / esp8266-oled-ssd1306

Driver for the SSD1306 and SH1106 based 128x64, 128x32, 64x48 pixel OLED display running on ESP8266/ESP32
https://thingpulse.com
Other
2.02k stars 640 forks source link

Memory requirements (question) #190

Closed suculent closed 6 years ago

suculent commented 6 years ago

How much free stack/heap does the lib require? It works for me in examples, but crashes on ui.init() when added to my full project. I’ve tried to delay the init from setup() to loop() with much more free stack available (4k stack, 23k heap), but it still won’t work.

suculent commented 6 years ago

OK, so I've found this, which is almost an answer:

// Use DOUBLE BUFFERING by default
#ifndef OLEDDISPLAY_REDUCE_MEMORY
#define OLEDDISPLAY_DOUBLE_BUFFER
#endif

I've also solved my crash, it was caused by having OverlayCallback and FrameCallback defined dynamically inside a function.