Posts: 53
Threads: 13
Joined: Nov 2017
Reputation:
0
2019-02-06, 06:35 PM
(This post was last modified: 2019-02-11, 12:21 PM by luchin0.)
I'd like to have the possibility to have a momentary pusch that can shutdown all the program and the raspberry.
In this way before turn off the power, i can shutdown the raspy in a very simple way.
I have set the moitessier hat and i don't know if there is some free GPIO that i can use for this purpose.
Thank you
Posts: 800
Threads: 46
Joined: Jun 2017
Reputation:
25
2019-04-24, 03:33 PM
(This post was last modified: 2019-04-24, 04:22 PM by jim321.)
on your link Step 5: Activate On Startup ?
it might be easier to use nano rather than leafpad
sudo nano /etc/rc.local
(before exit 0 in the code) add the following:
sudo python3 /home/shutdown.py &
ctrl x y enter
reboot
Posts: 53
Threads: 13
Joined: Nov 2017
Reputation:
0
Thankyou for the reply. It's what i made but didn't work.
Sorry for ny bad english and thank you for the help
Inviato dal mio ANE-LX2 utilizzando Tapatalk
Posts: 800
Threads: 46
Joined: Jun 2017
Reputation:
25
2019-04-24, 05:33 PM
(This post was last modified: 2019-04-24, 05:40 PM by jim321.)
try giving it permissions
sudo chmod 755 shutdown.py
oops..maybe.... sudo chmod 755 python3 shutdown.py
may need reboot