Go Down

Topic: Can you preload audio onto the arduino? (Read 927 times) previous topic - next topic


My roommate is under the impression that our house is haunted. I want to scare her via audio. What would be the best way to go about doing this?

Wireless would be bliss, but a timer circuit would be easier. Upload audio onto mp3 device, and send out the signal via audio jack to some timing circuit? I assume I'd have to set the audio track on a loop.

Or can I preload the audio directly onto my arduino and code the timing (like hit play @ 2am or in 6 hours)


You cane store a small segment of audio in an Arduino sketch. See the Sonic Screwdriver project:

Send Bitcoin tips to: 1G2qoGwMRXx8az71DVP1E81jShxtbSh5Hp


you can figure out approximately how long of audio you can store on your Arduino by finding out:

1 how much of your Arduino's memory your sketch takes (say Ssize) out of your total available memory (say Tsize).
2 then do: (Tsize-Ssize)/((Bit depth of audio)*(Sample rate of audio)*(number of channels))=time available in seconds of audio

You can maximise available audio time by taking the bit depth down to 10 bit (this is already LOFI (kind of turns a voice into robot voice), WAVE and AIFF are at 16bits on CDs, 8Bit is an old gameboy sound...), using mono (1 audio channel instead of 2) and taking the sample rate to 32kHz. Try doing all this on your file once it's already compressed ( MP3 ). Play with the balance of bitdepth and samplerate till you get something audibly satisfying.

VLC allows you to tweek export setting i think, or freeware like Audacity...

Hope that helped

Go Up