How to turn on & off your raspberry pi safely with the push of a button! Headless Pi on/off button!

Sdílet
Vložit
  • čas přidán 23. 09. 2020
  • In this very special episode, I show you how to safely turn your Raspberry Pi on or off with the simple push of a button! This is a must for any headless Pi where you do not have easy access or just do not want to attach a keyboard or connect through SSH to just turn it off.
    This works with any Raspberry Pi and worked great for my digital marquee (headless Raspberry Pi Zero W) and my Retropie Raspberry Pi 3B+. It also comes in handy when your Pi just glitches/freezes and you have no way of communicating/interacting with it and you have no choice but to hard unplug the power to reset it, which can cause corrupt sd cards. DOH!
    When you buy a Raspberry Pi Zero W, it comes with the header strip (GPIO) not soldered on, so in this video I will teach you how to solder in the header strip as well. Sweet!
    I also show you what you have to do in terminal on your pi in order to load the safe shutdown script whenever the number 5 and 6 pinouts on the header strip are connected due to a momentary push button being pressed (on/off button).
    Quick links to parts of the video!
    00:36 Intro to the project
    05:33 Soldering header strip tips and tricks
    14:06 commands to enter into terminal and where to get it
    Special thanks to Koda for the amazing LED linkable shop lights, I am SOOO glad I bought them! If you haven't seen their LED linkable shop lights yet, they are an amazing new feature to my garage and bring a smile to my face every time I step into the garage!
    kodabuilt.com/products/koda-4...
    Special thanks to the team at 8bit junkie as this is not my own invention or coding and without them, this would not be possible. Thanks!
    pie.8bitjunkie.net/retropie-s...
    Items required for a Raspberry Pi zero W:
    - computer or tv to watch this video and pause as you do the process
    - another computer and Putty to SSH into terminal (remote entry) or a keyboard to access terminal directly on your pi
    - Raspberry Pi Zero W (or any pi you want to easy start up/shut off)
    - header strip (comes with Raspberry Pi Zero W)
    - momentary On button
    - insulated wires (to connect button terminals to pi GPIO pinouts 5 & 6
    - soldering gun (electronics pencil type)
    - electronics solder with rosin core
    - wet paper towel/serviette
    - safety glasses
    - desoldering tool (optional until you make a mistake...lol)
    - electronics third hand (not required but would help)
    - power supply and hdmi cable for pi
    - sd card with Retropie already installed/configured
    - internet (duh)
    - 15 uninterrupted minutes to complete
    Have any questions about the build? Please feel free to comment and I will get back to you as soon as possible. I like to help people....it's my job.
    If you would like to keep up with behind the scenes info, pictures, and videos, follow us at / way_of_the_wrench
    If you would like a PDF of my Sketchup plans and dimensions, smack that subscribe button and go to the link below to collect your free plans: sdssautomotive.wordpress.com/
    If you enjoyed the video, learned some cool tech tips, or would like to use my plans, I would appreciate a like, a subscribe, and a share so I can be inspired to create more videos and continue to make better content for you guys! Thanks for watching and if you hit the post notification bell, you will know when our next videos are out!
    If you missed the earlier videos, start here www.youtube.com/watch?v=Mjo56... for episode#1.
    Music for this very special episode by :
    Royalty Free Planet:
    GLITCHUNTER - Neon Road: • GLITCHUNTER - Neon Roa...
    INTL.CMD - Coastline: • INTRNLCMD - Coastline ...
    Thanks to Teknoaxe for his royality free music for our intro/outro music.
    Please check out all of Teknoaxe's sweet music tracks!
    www.teknoaxe.com
    Intro music is Synthwave D www.youtube.com/watch?v=WNDvO...
    Outro music is Sythwave E www.youtube.com/watch?v=RBxnY...
    Way of the Wrench is looking for a collaboration with any CZcamsrs out there hard at work making royalty free music, just send me a message with your link for consideration.
    Disclaimer: These videos are intended for entertainment and inspiration. Working in a woodshop, metalshop, or autoshop is dangerous without proper safety and experience. Always seek professional advice and training before using any power tools/machinery. If you have any uncertainty before performing any shop procedure, stop and learn a safe method/technique. Do not attempt anything simply because you saw it in one of my videos. Be smart, use common sense, respect your power tools/machines, use safety glasses/guards and be safe.
  • Jak na to + styl

Komentáře • 64

  • @jananstunes
    @jananstunes Před 3 lety +1

    This is super awesome. I just subscribed and glad I did. Now about to watch more. Thanks for being detailed in how to do the small basic things like taping drill bits or how thick the bit should be. There are things that people just don't mention so thanks man

    • @wayofthewrench
      @wayofthewrench  Před 3 lety +1

      Sweet! Thanks for the watch and sub. Yeah what you just described is my niche in CZcams. Everything you need to know shown and in a way that is entertaining/memorable. Glad you liked the videos and if you think I'm worthy, I'd really appreciate a share out on your social media. Cheers!

  • @rednroll1
    @rednroll1 Před 2 lety +1

    Thanks for showing the full software install steps. That was the part I was really struggling with on getting the script installed on my setup. Works perfectly!

    • @wayofthewrench
      @wayofthewrench  Před 2 lety +1

      Glad the video helped you out. You should check out the virtual pinball cabinet project too. Thanks for the watch!

    • @rednroll1
      @rednroll1 Před 2 lety +1

      @@wayofthewrench One note, 1st time I tried, it didn't work. Realized that is because RetroPie by default has SSH disabled. So there's a few steps that could be added as an improvement suggestion for your next vid. Need to enable SSH on RetroPie RASPI-CONFIG. 😉

    • @wayofthewrench
      @wayofthewrench  Před 2 lety +1

      Ah noted. As I made this cabinet as a series, in one of the previous videos I turned on SSH already but it probably would be good to add this to the video description. Thanks for the suggestion! Cheers!

    • @rednroll1
      @rednroll1 Před 2 lety +1

      @@wayofthewrench Thanks! Seems to be a common oversight. Been running across that frequently in other similar RetroPie guides. Others provide guides using a PC to Network into Raspberry Pi via Samba, where the first time you do that, you need to provide the pi/raspberry login credentials but only need to do it the 1st time and then it gets saved on local machiine. A newb like me seems to keep running into those forgotten hurdles, doing everything for the 1st time. 😀

    • @wayofthewrench
      @wayofthewrench  Před 2 lety

      It's all part of the experience, if it was too easy, it wouldn't be fun! Cheers!

  • @MuhammadFloyd
    @MuhammadFloyd Před 2 lety +1

    thanks so much for the help. i wish i saw what the button looked like so i know if im getting the right kind and how you wired that up too.

    • @wayofthewrench
      @wayofthewrench  Před 2 lety

      You can use any momentary button that is normally off but on when pushed. I used cheap arcade microswitch buttons. If you're still not sure, you can look at my parts video for the arcade cabinet. Thanks for the watch!

  • @KJMcLaws
    @KJMcLaws Před 2 lety +1

    When I solder I like to use flux core solder and then put some on the tip of the hot iron, hold it against the contact and the pin, then slowly add more solder, wait 1 second or so with the iron in the solder and then pull up. If you hold it too long the flux burns off and then you get the solder following the tip and leaving those nasty points. Also as long as you're not soldering something super heat sensitive it can help to take excess solder off by using the soldering iron. Wipe it off and then hold it to the solder and then repeat. Finish off by adding a tiny bit more solder (and thereby adding a tiny bit more flux) and you'll have a nice joint that you won't believe you made. I'm just a newb but this has helped me make joints that my cousin thought came preinstalled 😁

    • @wayofthewrench
      @wayofthewrench  Před 2 lety +1

      Good info! Yeah it would have been easier to pre tin the contacts and use a finer tip soldering iron too. Thanks for the watch!

  • @guillermovargas1535
    @guillermovargas1535 Před 3 lety +1

    I’m almost done with my arcade cabinet! I ended up not using the furniture connectors, but I made some changes on my build. It was a crazy ride but it looks pretty cool !

    • @wayofthewrench
      @wayofthewrench  Před 3 lety +1

      I would love to see it when your done, send me a message on the Way of the Wrench instagram (link in description). Its a good feeling to play on these after all of the hard work. Any hiccups/things not go right?

    • @guillermovargas1535
      @guillermovargas1535 Před 3 lety

      Way of the Wrench I’ll send you pictures and videos, I’m surprised on how it turn out with the limited tools I had. I still need to wire the audio and design the warping on the sides and console. I made it so it connects to a ps4 pro. I’ll give you a more detail info in maybe two weeks when I’m done ✌️

    • @wayofthewrench
      @wayofthewrench  Před 3 lety

      Sounds good!

  • @jamieshelley6079
    @jamieshelley6079 Před 2 lety +1

    Many thanks!

  • @hugorobson4233
    @hugorobson4233 Před 2 lety +1

    Thanks for such an amazing tutorial, your cabinet looks amazing! Just one simple question: I have those pins occuppied with the fans (RP4). Are there any other pins where I can connect the button, or do you know if there is any other place where to put the fans? Thanks!!

    • @wayofthewrench
      @wayofthewrench  Před 2 lety +1

      Thanks Hugo! Glad you liked it, you should make one! Free plans are in the description. If you google rpi4 pinouts, you can find other pinouts that can be regulated 5v/or grounds like pins 2 and 4. Or there are other gpios that can be outputs. You might be able to change the program to use different pinouts as well but I haven't tried that so Im not 100% sure. Thanks for the watch!

    • @hugorobson4233
      @hugorobson4233 Před 2 lety

      @@wayofthewrench thanks for the answer! I'll dig a little more, and will be back with an answer 😁

  • @dugabomber5993
    @dugabomber5993 Před rokem +1

    Ty for the video

  • @ianwitcombe601
    @ianwitcombe601 Před 2 lety

    Love this series and project, hoping to do this with my daughter as well as the virtual pinball as you go when time allows it, however before I start my project I was wondering when you hope to put out the breakdown of costs and parts required as I did have a raspberry 4 before it got damaged and want to get parts in place ready for when I can finally get home to see my daughter and start. Thanks in advance and got a sub from me for sure. It’s awesome.

    • @wayofthewrench
      @wayofthewrench  Před 2 lety +2

      Yeah Ian this will be a great project for you and your daughter! I would recommend just taking your time and ordering stuff as you go, that way the overall cost is spread out and not as noticible. Plus this gives you more time to find cheap or free parts. Start with a rasp pi 3 b plus ( $100 after proper power supply and case and cable) at a minimum or a pi 4 but I also recommend taking a look at my how to fix a free computer video so you can use a pc which will be way more powerful and probably cheaper. Then you can install retropie and some games and play while you build. Try it out on a free monitor ( or used no more than $30 )to see if that is the size you want before you build too. After that you'll need mdf or plywood (roughly $70 a sheet). You'll need 3 to 5 sheets depending on your design. Cheap button, joystick, usb board for $60. Misc glue and screws and sand paper $40. T molding roughly $25 for 50 feet. 2.1 sound system with bluetooth $80. Speaker grills free to $20. Paint $50. Casters $25. Beyond that it just gets into the extras. Coin door $150. Marquee monitor $279. Marquee pi and kit $100. Graphics $300. Vinyl for control panel $80. For mine it added up in the end but it was my dream cabinet and the money was spent over a year. I still plan on spending some more for upgrades and mods too. Cheers and thanks for the watch!

    • @redherring5532
      @redherring5532 Před 2 lety

      @@wayofthewrench still watching the vid but wondering if you painted the cab or vinyl?

  • @saltydad2987
    @saltydad2987 Před 2 lety +2

    So does that switch work for the PI 4. Is it the same application to the motherboard?

    • @wayofthewrench
      @wayofthewrench  Před 2 lety +1

      Yes it should be pretty much the same except I remember there being another line of code needed for the rpi4. Here is a link to what I'm referring to. www.embeddedcomputing.com/technology/open-source/development-kits/raspberry-pi-power-up-and-shutdown-with-a-physical-button. Let me know if this works as I actually haven't messed with a rpi4 yet because I have just jumped to refurbishing older pcs that are free and are way more powerful for arcade projects. Cheers!

  • @ohcrazydiamond
    @ohcrazydiamond Před 3 lety +1

    Nice video thank you! Can I add those lines of code directly into a file of the sd? Thank you!

    • @wayofthewrench
      @wayofthewrench  Před 3 lety +1

      Thanks! You might but this way was pretty easy. There was a file to download and install so you would have to do that as well. I know this worked on my 2 raspberry pi though, not sure of other methods. Cheers!

    • @ohcrazydiamond
      @ohcrazydiamond Před 3 lety

      Way of the Wrench gotcha.👍🏼 Thank you so much for the prompt reply! Happy Holidays/Merry Christmas

    • @ohcrazydiamond
      @ohcrazydiamond Před 3 lety +1

      Another question. When you shut it down using this method do you still have the Red Light on or your Raspberry or it goes completely off? Thank you again!

    • @wayofthewrench
      @wayofthewrench  Před 3 lety

      It has been a while since I actually looked at the pi after shutting it off so I am not sure 100% but I think there is always a red light to show you have a stable power supply to the pi but the green light(s) blink a couple times and go out. I usually wait about 15 seconds or so and wait for the shutdown sequence to scroll across the screen and the display goes into a source not found screen and then I know it is off for sure. I do this for both pi on my cabinet before unplugging the power cord to the cabinet.

  • @andywilcox111
    @andywilcox111 Před 3 lety +8

    800 subs
    Production quality: 800k subs
    Workmanship: 8m subs

    • @wayofthewrench
      @wayofthewrench  Před 3 lety +2

      This made my day....thanks for the great comment! I do try my hardest to make the best videos I can for my subscribers. Would really appreciate a share on your social media cause it's super tough to break through youtube's algorithims and get my content out there. Thanks again!

  • @lesleyparker1019
    @lesleyparker1019 Před 3 lety +1

    Hi there, just wanna know when your next episode will come out, and I also think you should do a virtual pinball as a project, will follow the shit out of that, I build my Arcade machine exactly as yours and love my machine, would love to do a pinball machine, got the software done, have a 3 monitor system, with baller installer its sooooo easy to do, just need you to build the cabinet so we can follow :)

    • @wayofthewrench
      @wayofthewrench  Před 3 lety

      Sweet! I would love to see some pictures or a video of your cabinet (send me a DM on Instagram). There are already 5 or 6 of these "Way of the Wrench" designs out there, so welcome to the family! I have a ton of stuff to film and put out for some upgrades to the arcade cabinet but I haven't had a chance to film/edit yet. YES! I have been researching and messing around with my first virtual pinball cabinet and I have a 3 screen set up ready to go as well. I am in the middle of deciding what my design will be so I can order parts with a theme in mind. My playfield is 46" HD 8ms lag 60 to 240Hz refresh rate tv and it looks amazing so far on the tables I have put into pinup player/popper. The videos and plans are coming soon I swear.....just not enough time in the day. Thanks for the watch!

    • @lesleyparker1019
      @lesleyparker1019 Před 3 lety +1

      @@wayofthewrench It really was a pleasure following your videos and do my build. I cant wait for you to begin the pinball, look forward to that. I'm all the way from South Africa, so you can tell everyone that one of your builds is on the Africa continent :) I send you my pics of my build, Name I used is Acidmax (Gamer Tag).

    • @wayofthewrench
      @wayofthewrench  Před rokem

      Lesley! Just checking in, in case you didn't know....my virtual pinball series is alive and 24 videos strong. Thanks for suggestion a long time ago!

  • @WilsonBradleyTheOfficial

    I like the shirt

  • @alexmorrison6342
    @alexmorrison6342 Před 3 lety +1

    Awsome

  • @zk_6312
    @zk_6312 Před 9 měsíci +1

    Good project though you could have just used a 2-pin connector or soldered the wires directly to the board.

    • @wayofthewrench
      @wayofthewrench  Před 9 měsíci

      Yeah I could have but they have been ok (haven't disconnected in over 2 years). I still need to set this up on my main pi so I can have a safe reset when it has a jammer every now and then. Right now, I just open up the control panel and manually touch the contacts but it would be nice to have a button (I even drilled a hole for it so I could just poke the button when it needed it and so no one else could hit it. Thanks for the watch! You should check out my vpin build series....it's soooo good. Cheers!

  • @WeBuildStuff
    @WeBuildStuff Před 3 lety +2

    wow

    • @wayofthewrench
      @wayofthewrench  Před 2 lety

      Still have to show you this bad boy....one of these days

  • @cedricbanks2149
    @cedricbanks2149 Před 3 lety +1

    Get a flat head soldering tip when doing that.

    • @wayofthewrench
      @wayofthewrench  Před 3 lety

      yeah might have helped but the pads were so tiny and close. The best thing was to pre tin the pads on the board and then it went waaay easier.

  • @carterthiessen3322
    @carterthiessen3322 Před 3 lety +2

    Wow

    • @wayofthewrench
      @wayofthewrench  Před 2 lety

      You should see the virtual pinball I'm building....sooo cool

  • @sergheiv
    @sergheiv Před rokem +1

    Video starts 14:00 welcome

    • @wayofthewrench
      @wayofthewrench  Před rokem

      Yup, there's a time stamp at 14:02 as well. This video is part of a video series for a diy arcade cabinet so I included the step needed to wire in the on/off button for the script to work. Thanks for the watch!

  • @broderperdurabo
    @broderperdurabo Před 2 lety +1

    If you '"Soddeh" pins to a board, ute a flathead tip.

    • @wayofthewrench
      @wayofthewrench  Před 2 lety

      Good tip but in this case the solder pads were so tiny I don't think it would fit. Plus I used what I had, they may not be my best solder joints but there were good. No issues in 2 years of use. Thanks for the tip and the watch!

  • @ViRatio
    @ViRatio Před 3 lety

    Your from Slovakia?

    • @wayofthewrench
      @wayofthewrench  Před 3 lety +1

      I live in Canada but I am Slovak! Guess that makes me a Canvak or Slovadian. lol. Ahoy!

  • @cedricbanks2149
    @cedricbanks2149 Před 3 lety +1

    Word from the wise use a flat tip instead of point. A flat tip gives good solder point

    • @wayofthewrench
      @wayofthewrench  Před 3 lety

      Yeah I borrowed a general purpose pencil soldering iron but I have used fine point electronics soldering irons before that worked way better.....not my finest soldering.

    • @cedricbanks2149
      @cedricbanks2149 Před 3 lety +1

      @@wayofthewrench good build this is what i do in my spare time in the cave is practice on any power board your not using. I always see you perfect so i was gonna throw my solder sucker stick and solder braid thru the screen to you.

    • @wayofthewrench
      @wayofthewrench  Před 3 lety +1

      lol...I can imagine. I have to show my mistakes too, everybody can always improve.....that's what it's all about. Cheers!

  • @yomamapwnz
    @yomamapwnz Před rokem +1

    How much? TAKE MY MONEY

    • @wayofthewrench
      @wayofthewrench  Před rokem

      Lol....free. Just buy the materials. There is a whole series on how to make what you see. If you have any questions, feel free to ask.