How much memory should a ESP8266 D1 Mini have available?

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
PsuFan
Posts: 19
Joined: Mon Sep 30, 2019 7:35 pm

How much memory should a ESP8266 D1 Mini have available?

Post by PsuFan » Thu Apr 30, 2020 7:34 pm

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

bitninja
Posts: 165
Joined: Thu Sep 15, 2016 4:09 pm
Location: Spring, Texas

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

Post by bitninja » Thu Apr 30, 2020 10:03 pm

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.

PsuFan
Posts: 19
Joined: Mon Sep 30, 2019 7:35 pm

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

Post by PsuFan » Fri May 01, 2020 1:42 am

Yeah thanks. Is the 33K normal? Is there a way to configure what is available to memory and what is available to storage?

User avatar
tve
Posts: 216
Joined: Wed Jan 01, 2020 10:12 pm
Location: Santa Barbara, CA
Contact:

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

Post by tve » Fri May 01, 2020 4:27 am

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.

PsuFan
Posts: 19
Joined: Mon Sep 30, 2019 7:35 pm

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

Post by PsuFan » Fri May 01, 2020 1:40 pm

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.

modulusmath
Posts: 30
Joined: Thu Jun 30, 2022 3:21 am

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

Post by modulusmath » Mon Aug 01, 2022 1:39 am

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.

Post Reply