The circuit

Create a constant tone
The first thing I did was to create a constant tone. This allowed me to check whether the Arduino could send sound signals to the phone. Guess what? It worked!
However, playing a different sound signal on each phone did not work. The library I was using could only play one tone at a time. Something to worry about later!
Find the code here ->Play 2 sec of music
The next step was to play some music instead of just a constant tone. Sadly, an Arduino doesn’t have that much memory. So, I could only play 2 seconds of music. To play music, you need to be sure the Arduino can actually read it. So you need to convert it. Therefore, I used “Audacity”.
The steps I took:
- Shorten the music to 2 seconds
- Export the music with the following settings:
- .wav file
- 8 bit
- 8000 Hz
- Mono
- From wav to hex (using the FileToCArray tool)
- Add hex into the Arduino code
Play 1 song
In the end, I didn’t want to be limited to only two seconds of sound. I want to play various voice messages and instructions, so I definitely need more storage than that.
To solve this, I added a micro SD card reader to my Arduino to expand its memory. And now, my phone is playing a whole song!
Find the code here ->Play a different song on each phone
Now that I can play one song, you’d think playing different songs on each phone would be easy. But it really isn’t. Between the Arduino’s limitations and the buffering, it’s just not working that well yet. I’ve decided to put the coding on hold for a moment. I want to ensure the hardware is 100% perfect first.
Find the code here ->At the moment I was just running tests to see if my hardware setup was working. All of the code is made with Gemini Pro.