Git Product home page Git Product logo

pi-power-button's Introduction

pi-power-button

Scripts used in our official Raspberry Pi power button guide.

Installation

  1. Connect to your Raspberry Pi via SSH
  2. Clone this repo: git clone https://github.com/Howchoo/pi-power-button.git
  3. Run the setup script: ./pi-power-button/script/install

Uninstallation

If you need to uninstall the power button script in order to use GPIO3 for another project or something:

  1. Run the uninstall script: ./pi-power-button/script/uninstall

Hardware

A full list of what you'll need can be found here. At a minimum, you'll need a normally-open (NO) power button, some jumper wires, and a soldering iron. If you don't have a soldering iron or don't feel like breaking it out, you can use this prebuilt button instead.

Connect the power button to Pin 5 (GPIO 3/SCL) and Pin 6 (GND) as shown in this diagram:

Connection Diagram

Is it possible to use another pin other than Pin 5 (GPIO 3/SCL)?

Not for full functionality, no. There are two main features of the power button:

  1. Shutdown functionality: Shut the Pi down safely when the button is pressed. The Pi now consumes zero power.
  2. Wake functionality: Turn the Pi back on when the button is pressed again.

The wake functionality requires the SCL pin, Pin 5 (GPIO 3). There's simply no other pin that can "hardware" wake the Pi from a zero-power state. If you don't care about turning the Pi back on using the power button, you could use a different GPIO pin for the shutdown functionality and still have a working shutdown button. Then, to turn the Pi back on, you'll just need to disconnect and reconnect power (or use a cord with a physical switch in it) to "wake" the Pi.

Of course, for the GND connection, you can use any other ground pin you want.

pi-power-button's People

Contributors

zlevine avatar josephtyler avatar maddox avatar terokorp avatar dieseltravis avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.