I am trying to utilize the ESP32-AudioI2S library with my Arduino Nano esp32, and have run into an issue with compilation, specifically regarding the aforementioned library. The error message directs me to the psram_unique_ptr.hpp file, saying that the include line 'span.h' cannot be found.
I have verified that my device should be able to run this code, as it is a multi-core processor like the github readme says. I have tried changing what board the arduino is looking for, from what I believe is the official arduino nano esp32, to the espressif list on the board manager, and it did change my results. The audio library would now properly compile, but the size my program took up was massive for what it was, resulting in verification failing anyway. Just for clarity, the code that follows is what I have been trying to run.
#include
#include
#include
#include
#include
//create audio object
Audio audio;
//defining pins for the SD card interface
int SD_CS = 10;
int SPI_CLK = 13;
int SPI_MOSI = 11;
int SPI_MISO = 12;
//defining pins for 98357A MAX connection interface
int I2S_LRC = 8;
int I2S_BLCK = 7;
int I2S_DATA = 9;
void setup() {
pinMode(SD_CS, OUTPUT);
digitalWrite(SD_CS, HIGH);
SD.begin(SD_CS);
audio.setPinout(I2S_BLCK, I2S_LRC, I2S_DATA);
audio.setVolume(15);
audio.connecttoFS(SD,"/14 bonus.mp3");
}
void loop() {
// put your main code here, to run repeatedly:
audio.loop();
}
This is the error message when I run it with the ESP32 arduino 'nano32' board selected:
Global variables use 60028 bytes (18%) of dynamic memory, leaving 267652 bytes for local variables. Maximum is 327680 bytes.
Sketch too big; see https://support.arduino.cc/hc/en-us/articles/360013825179 for tips on reducing it.
text section exceeds available space in board
Error compiling for board Nano32.
I have looked for a while trying to find any reference to missing the span folder, and on the issues page of the github have found 1 thread related to my issue. I did manage to find the file named 'platform.ini', deleted it, and re-ran the code to the same issue.
I am not exactly sure what the 'platformio' is that they are talking about in the github thread, other than that it is a website. A solution to the span folder not being found would be appreciated, or any next steps that I could take.
Thank you very much for your help.