{"id":2318,"date":"2015-08-16T09:22:56","date_gmt":"2015-08-16T14:22:56","guid":{"rendered":"https:\/\/www.westfloridacomponents.com\/blog\/?p=2318"},"modified":"2016-01-01T15:46:51","modified_gmt":"2016-01-01T20:46:51","slug":"adding-a-reset-switch-to-your-raspberry-pi","status":"publish","type":"post","link":"https:\/\/www.westfloridacomponents.com\/blog\/adding-a-reset-switch-to-your-raspberry-pi\/","title":{"rendered":"Adding a Reset Switch to your Raspberry Pi"},"content":{"rendered":"<p>Normally, shutting down the tiny credit card sized single board computer, the RBPi or Raspberry Pi, involves pulling the plug. That means disconnecting the power cable from the RBPi board. However, that is a risky way of shutting down the SBC, since it may be in the process of transferring data to the SD card, and the power interruptions may cause corruption of the memory card. Another problem with frequent removal and re-insertion of the power cable is the damage this may cause the connector port. Program development on the RBPi may cause it to hang occasionally. Therefore, frequent restarting via power cycling with removal\/re-insertion of power cable will be a problem. A simple fix is to add a simple reset function to the RBPi. You can do this in one of three ways. The first is to use a USB reset button. The second is to use a motherboard jumper on the GPIO bus. The third option is useful only for RBPi Models B Rev2 and B+, where you solder pins on the P6 header and connect to a momentary button. The third option is the most complicated, requiring soldering on the RBPi.<\/p>\n<p>Although the first option of a USB reset button is the simplest, it also ties up one of the USB ports on the RBPi. With only one or two USB ports available, depending on the RBPi model, this may not be a very viable option for many. However, in case it works for you, get a USB reset button from any specialist online stores. Those who want all their GPIO pins available or those who are averse to soldering may use the USB reset button connected to the RBPi for scenarios when the device needs to be booted.<br \/>\nIf you can salvage a jumper from an old motherboard or an HDD, connect it on two pins on the RBPi GPIO. All RBPi models have GPIO pins \u2013 models A &#038; B have 26 pins each, while the models A+ &#038; B+ each come with 40 pins. You need to place the jumper on the GPIO3, pins 5 and 6, counting from the left while holding the board the right way around.<\/p>\n<p>However, you will need a <a href=\"https:\/\/github.com\/g0to\/misc_scripts\/blob\/master\/raspi_gpio_actions.sh\">script<\/a> to detect the jumper. Make the script executable before running \u2013 use &#8216;sudo chmod 755&#8217; for this. You will also need to run the script every time you boot up. For this, add the following line to \/etc\/crontab \u2013 <\/p>\n<p>@reboot root \/home\/user\/scripts\/gpio_actions.sh<\/p>\n<p>Whenever you place the jumper on the specified pins of the GPIO, RBPi will sense it and will shut itself down.<br \/>\nThe third option involves using the P6 header, which is available only on the latest models of the RBPi \u2013 models B Rev 2 &#038; B+. On the Model B Rev 2, you can locate P6 next to the HDMI port. On the model B+, you will find P6 next to the label marked as &#8216;Raspberry Pi 2014&#8217;. Normally, the RBPi does not come with pins soldered on to P6, so you will have to do the soldering.<\/p>\n<p>Once you have soldered the pins, install the jumper with the switch to reset the RBPi. However, use this switch with caution, only when the RBPi is not responding.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Normally, shutting down the tiny credit card sized single board computer, the RBPi or Raspberry Pi, involves pulling the plug. That means disconnecting the power cable from the RBPi board. However, that is a risky way of shutting down the SBC, since it may be in the process of transferring data to the SD card, [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[324],"tags":[1150,326,470],"class_list":["post-2318","post","type-post","status-publish","format-standard","hentry","category-raspberry-pi","tag-raspberry-pi","tag-raspberry-pi-projects","tag-rbpi"],"_links":{"self":[{"href":"https:\/\/www.westfloridacomponents.com\/blog\/wp-json\/wp\/v2\/posts\/2318"}],"collection":[{"href":"https:\/\/www.westfloridacomponents.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.westfloridacomponents.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.westfloridacomponents.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.westfloridacomponents.com\/blog\/wp-json\/wp\/v2\/comments?post=2318"}],"version-history":[{"count":1,"href":"https:\/\/www.westfloridacomponents.com\/blog\/wp-json\/wp\/v2\/posts\/2318\/revisions"}],"predecessor-version":[{"id":2516,"href":"https:\/\/www.westfloridacomponents.com\/blog\/wp-json\/wp\/v2\/posts\/2318\/revisions\/2516"}],"wp:attachment":[{"href":"https:\/\/www.westfloridacomponents.com\/blog\/wp-json\/wp\/v2\/media?parent=2318"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.westfloridacomponents.com\/blog\/wp-json\/wp\/v2\/categories?post=2318"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.westfloridacomponents.com\/blog\/wp-json\/wp\/v2\/tags?post=2318"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}