Reply To: Simple 1 button GPIO on off switch: 1 switch, 2 wires, 10 lines of code

Home Forums RetroPie Project GPIO Adapter, ControlBlock etc. Simple 1 button GPIO on off switch: 1 switch, 2 wires, 10 lines of code Reply To: Simple 1 button GPIO on off switch: 1 switch, 2 wires, 10 lines of code

#121989
Profile photo of kiwijam777
kiwijam777
Participant

Here are copies of my files, in the attached zip:

/etc/rc.local
/home/pi/scripts/shutdown.sh

I drop these into every new pi i have, and then i reboot and they work. If they dont work for you i am not sure what to suggest. Do you have the the folders “/sys/class/gpio”? If not, I think you can do:

sudo apt-get update
and
sudo apt-get install rpi.gpio

Skip to toolbar