Page 1 of 1

How much memory should a ESP8266 D1 Mini have available?

Posted: Thu Apr 30, 2020 7:34 pm
by PsuFan
If I flash v1.12 stable onto a 4M D1 mini and import gc, gc.mem_free() how much should I have? It responds 32,944 which is ~33k available? Where's the other 3.5m? Also tried to flash with flash_size=4MB but same result (auto detected 4MB too).

Thanks,
PsuFan

Re: How much memory should a ESP8266 D1 Mini have available?

Posted: Thu Apr 30, 2020 10:03 pm
by bitninja
There is a difference between Flash memory and the memory you have available for your programs (RAM).

The 33K available is memory you have for variables and running MicroPython.

The 4MB of flash memory is split between storing Micropython itself and the rest is used as the file system for storing your scripts and files.

Hope that helps.

Re: How much memory should a ESP8266 D1 Mini have available?

Posted: Fri May 01, 2020 1:42 am
by PsuFan
Yeah thanks. Is the 33K normal? Is there a way to configure what is available to memory and what is available to storage?

Re: How much memory should a ESP8266 D1 Mini have available?

Posted: Fri May 01, 2020 4:27 am
by tve
Yes: if you buy an esp8266 you get a tad over 30KB of RAM available, if you buy an esp32 you get a tad over 110KB of RAM available ;-) So the configuration happens in the shopping cart :lol:

Seriously, maybe this is helpful? https://deepbluembedded.com/microcontro ... -tutorial/ It's obviously not about the esp32 or micropython, but seems to touch the right topics.

Re: How much memory should a ESP8266 D1 Mini have available?

Posted: Fri May 01, 2020 1:40 pm
by PsuFan
LOL, thanks. I do have some ESP32 on the way. I saw they were using them to drive a ili9341 TFT. It does work pretty well with a 8266 until I tried to send all or even half the screen at the same time lol. I think it's 153K, so even the 32 can't send the whole thing.

Re: How much memory should a ESP8266 D1 Mini have available?

Posted: Mon Aug 01, 2022 1:39 am
by modulusmath
Depending on what you're doing, might be tough to beat https://www.makerfabs.com/makepython-es ... r-lcd.html w/the wrover option. It's $14.99 + shipping (at least in the US). Clearly significantly more costly than esp8266 but I overcame my ram issues w/it.
Color oled as well.

I am fiddling w/using the esp32-cam also w/the same amount of ram, but I am not quite successful using gpio pins.
I'm trying the Esp32-Cam CH340 soon, if interested in my results.