08-02-2019, 03:29 AM
Hi,
Multiple commands have to be placed in a script file. You would enter the script file path as the CMD in GPIO button config.
Example:
1. Create the script file
2. In GPIO button config set CMD = /home/pi/test.sh
-Tim
Multiple commands have to be placed in a script file. You would enter the script file path as the CMD in GPIO button config.
Example:
1. Create the script file
Code:
pi@rp3:~ $ sudo nano test.sh
pi@rp3:~ $ cat test.sh
#!/bin/bash
mpc stop && mpc play 5
pi@rp3:~ $ sudo chmod +x test.sh
2. In GPIO button config set CMD = /home/pi/test.sh
-Tim