A Button to Switch your Pi Safe On and Off

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey everyone this is lutz and today i'm going to show you how you can use a simple switching button to turn on and safety off your raspberry pi within only two steps so i know you're curious how this works so don't waste time and start okay so the first thing we're gonna do is we have to collect our hardware we need so in that case only a switch but don't make the mistake don't take one of those this is wrong we need something what is doing something like this so be sure that you have the right one then you connect it between the raspberry pin 3 and gpio ground so this is important don't take another pin because we need the hardware support of that pen and that's it go to software part so now we come to the last point of our video we have to adapt the software of our raspberry pi so we do this just open a console and then we just say studio nano and go for boot config and here we just scroll down to the end and here we just add a comment like power button or something and yeah then we just type in dt overload oh sorry dt overlay and that one is just gpao minus shutdown and yeah that's more or less everything you need to do and that file but just for explaining you if you want to change something so at default the gpio3 is needed for the switch off button so if you want to use something else you just have to type gpio minus pin and then you give the number as example 5 or something like this so this you could also do or you can also use that command here if you need it um active low normally it's active low so this is meaning when you have a normal button and you press it then it's closing the circuit and if you have a button which is normally closed and you press it and it open so then you need to write here active low is zero but this is really seldom and just for explanation and that's it now we write it out and just as a hint when you change the gpio pin to a different one i'm not sure if it's working with every pin because this is not part of the official documentation and i didn't try it for every pin so there are some that works i know it but yeah just to let you know so and at the end you just say reboot and you're done so next thing you can awake your raspberry pi with button so i think that's quite cool if you like the video here are some more and see you next time goodbye
Info
Channel: Lutz
Views: 27,514
Rating: undefined out of 5
Keywords: raspberry pi power switch, raspberry pi 3, raspberry pi 4, on off switch raspberry pi, on off button raspberry pi, raspberry pi power button, power button, safe shutdown raspberry pi, raspberry pi power switch for safe shutdown, raspberry pi safe shutdown, raspberry pi shutdown, shutdown switch, raspberry pi shutdown switch, raspberry pi shutdown button script, raspberry pi 4 shutdown button, raspberry pi shutdown button gpio, raspberry pi shutdown button, safe shutdown
Id: h6GFXtKkXco
Channel Id: undefined
Length: 3min 7sec (187 seconds)
Published: Fri Aug 12 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.