Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Solved: GPIO Config
#3
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

if [ $# -lt 1 ]
then
       echo "Usage : $0 buttonnumber"
       exit
fi

case "$1" in

1)
   mpc stop
   mpc clear
   mpc load 'Default Playlist'
   mpc play

   ;;
2)
   mpc stop
   mpc clear
   mpc load musik
   mpc play

   ;;
3)  
   mpc stop
   mpc clear
   mpc load Favorites
   mpc play

   ;;
9)
  mpc random
  mpc next
  mpc random
  ;;
*) echo "Signal number $1 is not processed"
  ;;
esac
Reply


Messages In This Thread
GPIO Config - by owagott - 08-26-2019, 06:50 PM
RE: GPIO Config - by Tim Curtis - 08-26-2019, 07:12 PM
RE: GPIO Config - by owagott - 08-31-2019, 01:59 PM
RE: GPIO Config - by Tim Curtis - 08-31-2019, 02:01 PM

Forum Jump: