This project provides a simple and reliable way to safely turn your Raspberry Pi on and off using GPIO pins and the run/reset pad at the backsite, preventing data corruption and ensuring safe operation. It's compatible with any Raspberry Pi model, including the Raspberry Pi Zero 2W.
- Safe shutdown using GPIO pins.
- Optional LED indicator for power status.
- Prevents data loss and system corruption.
- Works with any GPIO pins on the Raspberry Pi.
Follow these steps to modify the config.txt
for safe shutdown:
- Open the
config.txt
file located in/boot/
. - Add the following lines:
gpio=27=op,dl dtoverlay=gpio-shutdown,gpio_pin=17,active_low="y"
From the command line:
sudo sh -c 'echo "gpio=27=op,dl" >> /boot/firmware/config.txt'
sudo sh -c 'echo "dtoverlay=gpio-shutdown,gpio_pin=17,active_low=\"y\"" >> /boot/firmware/config.txt'