Go Down

Topic: How to upload a sound sample into Arduino memory? (Read 455 times) previous topic - next topic


Im a begineer to Arduino. I want to upload wav file into the arduino memory so that i can trigger sound using a piezo sensor. I converted the wav file into a header file, but having problems in compiling it. The error message shows that the size of array is too large. Can someone enlighten me ? Please


Nov 08, 2019, 04:54 pm Last Edit: Nov 08, 2019, 04:57 pm by DVDdoug
How big is the WAV file?   You'll probably need an SD card shield.   If it was me, I'd "go all the way" and get an audio shield...

File size = Sample Rate x (Bit depth / 8 ) x Number of channels x Playing Time in seconds.

For example, CD audio (or a "CD quality" WAV) is 44,100Hz x (16/8) x 2 Channels = 176,400 bytes per second.

Go Up