I am creating a project where i need to play audio with a max98357a. I have used this chip in other projects as well and this works.
On this project it also works but as soon as i make a successful wifi connection, i cannot get any audio anymore.
At some point also the esp32 panics and restarts.
After some investigation i see the ESP32 has a really low free heap.
I created a complete new empty project and i show the free heap and the flash size:
Free heap size: 279148
Flash size: 16777216
When i upload a new blank sketch and just show the same data via Arduino IDE, i get this:
Free heap size: 4434571
Flash size: 16777216
With the Arduino IDE, it shows 4434571 instead of 279148 (16 times more with the same code)
My partition looks like this:
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x5000,
otadata, data, ota, 0xe000, 0x2000,
app0, app, ota_0, 0x10000, 0x760000,
app1, app, ota_1, 0x770000, 0x760000,
eeprom, data, 0x99, 0xed0000, 0x40000,
spiffs, data, spiffs, 0xf10000, 0xf0000,
Code:
void setup() {
Serial.begin(115200);
}
void loop() {
Serial.print("Free heap size: ");
Serial.println(esp_get_free_heap_size());
Serial.print("Flash size: ");
Serial.println(ESP.getFlashChipSize());
}
What is going wrong?