Don’t forget the search function in this forum
This prior answer might help understand… it is basically a 4-in-1 button that responds with one of four strings - ‘stop, play, prev, next’, nothing more.
I use NodeJS on the RPi so this code might help you get started… but I have not yet bothered to actually make the RPi play any music… that can probably be Googled and then you could run that music code with this control code below.
Note: if you use WiringPi then just use a similar if-then process, but in C++
var PlayerWidget = new blynk.VirtualPin(0); // Setup Player Widget on V0
var PlayerDisplay = new blynk.VirtualPin(1); // Setup Display Widget on V1
// Player Widget
PlayerWidget.on('write', function(param) { // Watches for PlayerWidget
PlayerDisplay.write(param); // Shows Player Widget output on Display Widget
if (param == 'stop') { // If PlayerWidget 'stop'
//
// Do something to STOP music/video/etc.
//
} else if (param == 'play') { // If PlayerWidget 'play'
//
// Do something to PLAY music/video/etc.
//
} else if (param == 'prev') { // If PlayerWidget 'play'
//
// Do something to skip BACKWARD to music/video.etc.
//
} else if (param == 'next') { // If PlayerWidget 'play'
//
// Do something to skip FORWARD to music/video/etc.
//
}
});