I’m working on a project that plays short voice prompts from an SD card or the SPI flash memory on an Itsybitsy M0. It only requires three simple modifications to the AudioZero library.
One change in AudioZero.h
Code: Select all
//#include <SD.h>
#include <sdFat.h>
Two changes in AudioZero.cpp
Code: Select all
//#include <SD.h>
#include <sdFat.h>
and
Code: Select all
//analogWrite(A0, __WavSamples[__SampleIndex++]);
analogWrite(A0, __WavSamples[__SampleIndex++] << 2); // shift 8 bit wav data to 10 bits
My files are 44 Kbytes to 65 Kbytes in size and work better if stored on SPI flash. I don’t know how much of the flash is available, but I know some of it is reserved for Python. Since all my development is via Arduino, can I safely erase all of the pre-existing files and folders from SPI flash without causing any problems?