A robust and easy‑to‑use Arduino library for controlling the DY-SVAudio5W
Audio Module using serial communication.
This library provides a clean, object‑oriented interface for sending
audio commands, controlling playback, adjusting volume, and querying
device status.
- Supports:
- Play / Pause / Stop\
- Volume Up / Down / Set Volume\
- Mute / Unmute\
- File & Folder based playback\
- Track selection\
- Querying module status\
- Equalizer\
- Looping Modes\
- Non-blocking and intuitive command structure\
- Compatibility Arduino UNO(Tested), Nano(Tested), ESP32(Not Tested), ESP8266(Not Tested), Raspberry Pi(Not Tested) and more
- Go to Sketch → Include Library → Add .ZIP Library...\
- Select the downloaded
DYSVAudio5W.zip\ - Done! The library will now appear under File → Examples → DYSVAudio5W
The Power pins of DYSV module should connect to 5V and GND
TX and RX of DYSV should connect to Software Serial(RX and TX) respectively
TX of DYSV -> RX of MCU
RX of DYSV -> TX of MCU
#include <SoftwareSerial.h>
#include "DYSVAudio5W.h"
//Connecting to Arduino Uno pins
int RX_PIN = 10;
int TX_PIN = 11;
SoftwareSerial Serial1(RX_PIN, TX_PIN); //Software serial is used to send UART commands to the module
DYSVAudio5W player(Serial1, 9600, Serial); //Init
void setup() {
Serial.begin(9600); //Serial comm to computer
Serial1.begin(9600); //Serial comm to the audio module
player.begin();
}
void loop() {
player.startPlayback(); //Start playing the songs
}DYSVAudio5W/
│── src/
│ └── DYSVAudio5W.cpp
│ └── DYSVAudio5W.h
│── examples/
│ ├── EqualizerVolume/
│ │ └── EqualizerVolume.ino
│── library.properties
│── README.md
- Module requires valid FAT32 SD card
- Volume range: 0 to 30
- Commands are non-blocking but some modules require a short delay(Check Examples)
- DY-SV5W Module Datasheet
Pull requests are welcome!
Please follow standard C++ formatting and keep code readable.
LGPL-2.1 © 2025 Manjunathan S