Power button + Status LED
I'm trying to configure a power button and a status LED adding this lines to /boot/config.txt:
# Enable power button
dtoverlay=gpio-shutdown,gpio_pin=3
# Enable LED/power status indicator
enable_uart=1
In Rapsbian and Octoprint it works well, but in Repetier-Server I only can have status LED working. How can I enable pushbutton with this overlay?
Comments
We have gpio support for our lua language in side server and you can do the shutdown there as well, see
https://www.repetier-server.com/monitoring-plugins/
last example is a shutdown button.
Adding the special dtoverlay to config.txt will allow a safe shutdown without the need for any additional code running. It’s one easy option and also adds power on feature.
dtoverlay=gpio-shutdown,gpio_pin=3
enable_uart=1
Now it works!!!
This way it's better than adding code. Adds power on and power off features and is lighter because you need no code.
Your solution is also nice because it can also repower the pi according to
https://www.stderr.nl/Blog/Hardware/RaspberryPi/PowerButton.html
https://cdn.thingiverse.com/renders/8a/90/51/02/23/4858af56a0f47b5fc15f1f0c7965b079_preview_featured.jpg