Based on last week's idea, we started to make the concept into reality.
PIR sensor(fig1) and Adafruit Audio FX Mini Sound Board - WAV/OGG Trigger - 2MB Flash(fig3) are new material that we're trying to figure out.
Started by testing the functions fo these two material.
PIR Sensor
fig1. PIR Sensor
Found the code online and tested the PIR, it worked fine with the first round of testing.
fig2. PIR Sensor Testing Code
Adafruit Audio FX Mini Sound Board - WAV/OGG Trigger - 2MB Flash
Unlike PIR sensor, we had a lot of problems while testing the mini sound board, and eventually didn't able to connect the mini board into the final circuit.
fig3. Adafruit Audio FX Mini Sound Board - WAV/OGG Trigger - 2MB Flash
fig4. Adafruit Mono 2.5W Class D Audio Amplifier - PAM8302
This mini sound board can play sound tracks that were pre-loaded into the board by powering it thru Arduino or power pack...etc. We soon realized the board we got required a separate amplifier(fig4) to connect a speaker(fig5).
fig.5 Circuit of mini board + amplifier + Arduino
After successfully tested it with the Demo_Tracks(fig6), we tried to load the audios we wanted to use into the board. Followed the format it accepted: ogg & wav, and rename the files into the pin number so the board can automatically read the file.
fig.6 Demo_Tracks folder
Deleted the whole folder and only loaded the renamed file into the folder. The system said there's not enough space for the file. Then we found the hidden folder in the disk, which contained all the files we deleted before in the trash folder, which was unable to be deleted. It turns out that's the reason why the board didn't have enough storage space. But in the end, we accidentally erased everything on the disk, and the board can't be read anymore. Before that, we didn't figure out how to connect a button through Arduino and control the soundtrack.
Sound Tracks that are supposed to be Used
Green Light, Red Light sound track from Squid Game :