Play audio with the push of a button.
PlatformIO Core
pio run --target upload && pio device monitor
- DY-SV8F Voice Playback Module
- 4 Ohm 3 Watt Mini Speaker
- Arduino Pro Micro
- 6mm Momentary Button
- Perf board
- Headers
Set DIP switch on DY-SV8F to the following:
- Off
- Off
- On
DY-SV8F 5V-
->Arduino GND
DY-SV8F 5V+
->Arduino RAW
DY-SV8F IO0/TX
->Arduino 9
DY-SV8F IO1/RX
->Arduino 8
DY-SV8F Speaker +
->Speaker +
DY-SV8F Speaker -
->Speaker -
Button Pin 1
->Arduino 2
Button Pin 2
->Arduino GND
While the Arduino is disconnected plug the DY-SV8F
into your computer with a micro usb cable.
A flash media device will show up and you can drag files onto it.
Files should be named sequentially like 00001-file.mp3
, 00002-file2.mp3
Default audio files are listed in ./audio/.
Note that there is a hardcoded number of audio files specified in main.cpp
which is used for incrementing the track. If you add more files, make sure to increment that number.
Short press to play the current track.
Long press to increment the track and play the new track.