[FIXED] Normally open momentary switch and on/off command

Momentary On-Off Switch.pngI have build a Volumio player and have attached an normally open momentary switch to pins 5 (GPIO3) and 7 (GPIO4) and 6 (GND). I can switch Volumio on by pushing the switch. I installed the GPIO buttons plugin and enabled GPIO4 to shutdown Volumio.
A friend told me to use 2 diodes so there’ll be no connection betweeen the two GPIO pins.


This is awesome. Thanks for posting that and the instructions for assigning the button for shutdown. I added it to my system last night with a pair of LED status lamps running off the 3.3v supply and GPIO14 to show power and when the system is booted up and running. It works perfectly.


What diodes did you use? I don’t yet understand the different types.

You only need GPIO3 to turn on and off.

GPIO3 control for turning on is part of the rpi’s firmware.
Use the GPIO buttons plugin and set shutdown to GPIO3.

This is how I have mine setup and from standby ( red light on) press the button it powers up and boots volumio then press it again while in volumio it will shut down…so on and so forth