Obviously we can shut down any PC by pulling the plug or going for the off button directly, but I would never do that *cough*. Most PCs can be forced to switch off by holding the power button for 3 seconds. And we all know deep down our hearts, that it isn’t the right way to go and are thankful when the computer restarts and your hard disk is safe. For your RPI it can be harmful for the SD card and might require you to re-image it. Not so bad eh, UNLESS you have important data which you haven’t backed up! So when we came across this DIY shutdown button, which saves you from all those extra commands and shuts your Pi safely, we shared it instantly.
You don’t need any extra parts for this one too! You get a piece of wire and follow the steps and you’re good to go. This guide assumes you know the basics of RPI, and by they mean how to connect your Pi to a monitor and enter commands into the terminal. You can download the python script from the link below and choose the pin to connect your button to. This GPIO should be connected to ground. Boot the Pi to see if the script is working.
And if everything goes according to the plan, the green LED will flash a few times, signalling that it is ‘safe to shutdown’. It’s a good time to thank us!
Filed Under: Reviews
Questions related to this article?
👉Ask and discuss on Electro-Tech-Online.com and EDAboard.com forums.
Tell Us What You Think!!
You must be logged in to post a comment.