Hello,
I can’t find the correct use of esp.free and esp.freemem to know the current amount of used/free flash/RAM.
I tried gc.mem_free() but I’m not sure if the result if all the available RAM or just the heap or somerhing other.
Please, any hint?
Hi Enzo.
According to documentation: it returns the number of bytes of available heap RAM, or -1 if this amount is not known.
Learn more here: https://docs.micropython.org/en/latest/library/gc.html#gc.mem_free
Regards,
Sara
Hi.
Honestly, I don’t known.
Have you tried:
import micropython
micropython.mem_info()
Regards,
Sara
Thanks Sara,
I didn’t know of micropython module.
It gives back useful information about RAM but not about flash.
It’s a first step 🙂
Thanks.
Try to take a look at the documentation and see if you find something that can be more useful for your scenario: http://docs.micropython.org/en/latest/
I hope this helps.
Regards,
Sara
Not found anything more about free memory than micropython module which you told me.
Thanks for that, however, it’s better than nothing!
Enzo