01-12-2021, 02:03 PM
Just put the commands in a BASH script and assign the script to the button
1. Create myscript.sh in your home directory /home/pi/ otherwise referred to as ~
See example below.
#!/bin/bash
mpc clear
mpc load "my_playlist"
mpc play
2. Mark it executable
chmod +x ~/myscript.sh
1. Create myscript.sh in your home directory /home/pi/ otherwise referred to as ~
See example below.
#!/bin/bash
mpc clear
mpc load "my_playlist"
mpc play
2. Mark it executable
chmod +x ~/myscript.sh