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

#121587
Profile photo of kiwijam777
kiwijam777
Participant

Are you sure you named the file correctly? Check by typing:
ls /home/pi/scripts/
<enter>
Do you see it? Is it spelled correctly?

If not, Did you first create the folder and then the shutdown.sh file?

cd /home/pi/
<enter>
sudo mkdir scripts
<enter>
sudo nano shutdown.sh
<enter>
From here, you are in the file where you put all the text above. Exit and save. Now you are back at the command line. Try this to change permissions:
sudo chown pi shutdown.sh
<enter>
Now test it out again.

Skip to toolbar