[SOLVED] GPIO Config - Printable Version +- Moode Forum (https://moodeaudio.org/forum) +-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3) +--- Forum: Support (https://moodeaudio.org/forum/forumdisplay.php?fid=7) +--- Thread: [SOLVED] GPIO Config (/showthread.php?tid=1669) |
GPIO Config - owagott - 08-26-2019 Hi There, I want to assign several functions to one button. http://192.168.178.46/gpio-config.php It doesn't work with mpc stop && mpc clear && mpc load Favorites && mpc play or mpc stop && mpc clear && mpc load 'Default Playlist' && mpc play salute RE: GPIO Config - Tim Curtis - 08-26-2019 Multiple commands need to be in an executable script. Example: cd ~ sudo nano ./test_script.sh test_script.sh Code: #!/bin/bash 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 RE: GPIO Config - owagott - 08-31-2019 Thanks for this Tip. nano ./button.sh chmod +x ./button.sh http://192.168.178.46/gpio-config.php /home/pi/button.sh 1 /home/pi/button.sh 2 /home/pi/button.sh 3 /home/pi/button.sh 9 Code: #!/bin/bash RE: GPIO Config - Tim Curtis - 08-31-2019 Nice :-) |