Thank you for your donation!

Instruction Guide Use hardware momentary switches to control moOde
The help text under the SAVE button.

"NOTE: Use a comma to delimit arguments in the CMD field. Example: mpc,load,My Playlist"
Hi Tim,

As I understand that GPIO3 wakes the Raspberry Pi from a halt state, if I configure a button with the 'sudo poweroff' command, and specify Pin 3, do you think that button will both power the Pi down and wake it up again without any additional coding?

I haven't wired any buttons into a Pi but what I can say is that you don't need sudo for commands in the CMD field in GPIO Config. Just make sure that any commands with arguments for example "load playlist_name" are delimited with comma as below

load, playlist_name
Hi Tim, hi everyone!

I followed all the steps in this thread and got te buttons finally working!

one more thing there is. Is it possible to assign multiple commands to one button in the GPIO Handler?
I'd need a "mpc,clear -> mpc,load,playlist -> mpc,play" all on one button press?

Opened the thread to ask exactly the same question Smile
Just put the commands in a BASH script and assign the script to the button

1. Create in your home directory /home/pi/ otherwise referred to as ~
See example below.

mpc clear
mpc load "my_playlist"
mpc play

2. Mark it executable

chmod +x ~/
Thanks Tim. When you say assign the script to that button you mean put "~/my" into the GPIO dialog box in Moode instead of "mpc play" etc?
Yes, but use the absolute path instead of ~/

Hi every 1.First of all i will like to thank Tim for all his work end effort invested in this great project.i realy love to my problem/request.for my moode project i would to add only one button(pull-down) for both power up and power problem is although i possess a fair amount of  knowledge about electronics my coding knowledge is close to zero and from my researches for this project  some coding is necessary(i might be wrong).so if anyone has some ideas i will be very happy to put them in practice.thank you.i forgot to mention that i'm useing a rasberry pi 3+ 1Gb board plus IQaudIO Pi-DigiAMP+ with a 5 inch touchscreen display.

Forum Jump: