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.
Follow these steps to modify the config.txt
for safe shutdown:
config.txt
file located in /boot/
.
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'