Last active 1705433086

RPi GPIO shutdown

Jarno Rankinen revised this gist 1664248903. Go to revision

1 file changed, 13 insertions

gpio_shutdown.md(file created)

@@ -0,0 +1,13 @@
1 + Source: [https://github.com/CoolerMasterTechnology/Pi-Tool/issues/7#issuecomment-834979824](https://github.com/CoolerMasterTechnology/Pi-Tool/issues/7#issuecomment-834979824)
2 +
3 + FWIW, if all you want is for the shutdown button to work, this application is completely unnecessary. The button is on the standard/default shutdown pin, GPIO 3, so all you have to do is add this to your /boot/config.txt:
4 +
5 + # Enable shutdown button on GPIO 3
6 + dtoverlay=gpio-shutdown
7 +
8 + If you'd prefer to set the defaults explicitly:
9 +
10 + # Enable shutdown button on GPIO 3
11 + dtoverlay=gpio-shutdown,gpio_pin=3,active_low=1,gpio_pull=up,debounce=100
12 +
13 + As a bonus, pressing the button while shut down will start the pi back up again. I think that works either way, but.
Newer Older