08-26-2019, 07:12 PM
Multiple commands need to be in an executable script.
Example:
cd ~
sudo nano ./test_script.sh
test_script.sh
sudo chmod +x ./test_script.sh
Then specify the full path to the script as the CMD in GPIO Config.
/home/pi/test_script.sh
Example:
cd ~
sudo nano ./test_script.sh
test_script.sh
Code:
#!/bin/bash
mpc stop && mpc clear && mpc load Favorites && mpc play
sudo chmod +x ./test_script.sh
Then specify the full path to the script as the CMD in GPIO Config.
/home/pi/test_script.sh