Sleepy Pi 2: Getting Started

The Sleepy Pi 2 is designed in the physical HAT format and plugs into the GPIO header of the Raspberry Pi. The first job is to attach the 40-pin GPIO header that came with the Sleepy Pi 2 (either a stacking or low profile). This plugs into the 40-pin socket on the Sleepy Pi 2 through the holes in the underside of the board.

Sleepy Pi 2 Basic Connections

Sleepy Pi 2 Basic Connections

Power Options

The next job is to decide how to power the Sleepy Pi 2. You have two choices for powering Sleepy Pi 2:

  • Sleepy Pi 2’s 5V USB connector, Or
  • 5.5 to 30V via the external Power I/P Header

DO NOT power the Raspberry Pi from it’s own USB connection – the Sleepy Pi will not be able to control the power.

If you elect to use the external Power I/P header, then you can solder power leads directly to the Sleepy Pi 2 or solder in the supplied 2-pin screw terminal and screw leads into that.

Power up the Raspberry Pi

When you receive your Sleepy Pi 2, the Arduino is programmed with the simple example sketch ButtonOnOff and the jumpers (more on these later) are set to make it compatible with a Sleepy Pi 1.

At it’s very simplest, with this sketch, you can attach power to the Sleepy Pi 2 and press the large User Button to power up the Raspberry Pi. The green Power LED will light showing that there is power to the Raspberry Pi which should now boot up.

If the Raspberry Pi has been configured for Sleepy Pi (see below), then pressing the button again for around 5 secs will trigger a controlled shutdown.

If your Raspberry Pi has not been configured to shutdown with the Sleepy Pi then just issue a

and remove power once the Raspberry Pi has shutdown.

Setting Up The Raspberry Pi Software

In order to support programming and safe shutdown, the Raspberry Pi needs to be configured to operate with the Sleepy Pi. This involves loading the Arduino IDE and configuring the system. The easiest way to do this is to run the Sleepy-Pi-Setup.sh script that can be downloaded from the setup Github page.

If you’re brave, you can download the script directly from a command line with the magic incantation (note it is case sensitive and ‘master’ is lower case!):

and it’ll dump it into whatever directory you are in.

To run the script, you first need to make it into an executable by:

Then run the script with administrator privileges with:

Answer the initial questions, then sit back, cross your fingers and have a G&T whilst the script scrolls past like a scene out of some hacker movie.

If you feel the need to do this manually, or you want more information about what it’s doing you can look at the Setting up the Arduino IDE on Raspbian , Getting the Sleepy Pi to Shutdown the Raspberry Pi or the script itself.