dtoverlay=gpio-shutdown,gpio_pin=3
https://www.stderr.nl/Blog/Hardware/RaspberryPi/PowerButton.htmlThis will allow to shutdown your pi by short circuit:
GND (pin 6) and GPIO port 23 (pin 16):

sudo nano /usr/bin/listen-gpio
Set file executable:sudo chmod 755 /usr/bin/listen-gpio
Create service:sudo nano /etc/init.d/shutdown-through-gpio
Set service executable:sudo chmod 755 /etc/init.d/shutdown-through-gpio
Update global configuration - this will read if some changes has been made to startup applicaitions:sudo update-rc.d shutdown-through-gpio defaults
Reboot and you are ready to use 12mm wrench to shut down your pi:

No comments:
Post a Comment