Esta abordagem funciona para projetos Arduino / PlatformIO assim como ESP-IDF.
esp32_heap_free_example.cpp
#include <esp_heap_caps.h>
uint32_t freeHeapBytes = heap_caps_get_free_size(MALLOC_CAP_DEFAULT);esp32_heap_free_example.cpp
#include <esp_heap_caps.h>
uint32_t freeHeapBytes = heap_caps_get_free_size(MALLOC_CAP_DEFAULT);
Check out similar posts by category:
ESP8266/ESP32
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow