So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By BlackCode
#69451 Hello,

I was wondering if there is a way to get the free space of the ESP8266 in bytes, so I can calculate the
free storage in percentage.
Something like :
Also is there a way to get the total storage of the ESP8266?
This would be needed to calculate the percantage of free space.

Regards,
BlackCode
User avatar
By rudy
#69453
Sketch uses 249745 bytes (23%) of program storage space. Maximum is 1044464 bytes.
Global variables use 33968 bytes (41%) of dynamic memory, leaving 47952 bytes for local variables. Maximum is 81920 bytes.


The above is the output message when I compiled with the Arduino framework. I expect the same, or similar, is available on all the other.
User avatar
By karamike
#69466 I think you can check the remaining RAM (not Flash-RAM) with
Code: Select allESP.getfreeheap()


Keep in mind that this space might not be available in a single chunk, but fragmented into various smaller chunks.