User Manual

2/12/2018 PiJuice/Software at master · PiSupply/PiJuice · GitHub
https://github.com/PiSupply/PiJuice/tree/master/Software 8/18
Next we have the buttons menu - this configures the actions of the buttons on the PiJuice HAT (there are three surface
mount buttons, one of which also has a 2 pin 2.54mm header so you can break out a button on a cable to the edge of a case
or wherever you fancy).
There are a number of preset behaviours for the buttons - startup/shutdown etc and this menu also ties in to the "User
Scripts" menu shown above meaning you can actually trigger your own custom scripts and events based on the press of one
of these buttons very easily.
You can even trigger different events for a press, release, single press, double press and two lengths of long press - you can
even configure the length of time these long presses would take before triggering the event. As you can see the first button
is already configured for system power functionality and we would highly recommend that at least one of the buttons is
configured to these settings or you may have issues turning your PiJuice on and off :-)
Button events:
PRESS. Triggered immediately after button is pressed
RELEASE: Triggered immediately after button is released
SINGLE PRESS: Triggered if button is released in time less than configurable timeout after button press.
DOUBLE PRESS: Triggered if button is double pressed in time less than configurable timeout.
LONG PRESS 1: Triggered if button is hold pressed hold for configurable time period 1.
LONG PRESS 2: Triggered if button is hold pressed hold for configurable time period 2.
Button events can be configured to trigger predefined or user functions.
Hardware functions
POWER ON: This function will wake-up system. 5V regulator (5V GPIO rail) will be turned on if was off.
POWER OFF: 5V regulator (5V GPIO rail) turns off.
RESET: If run pin is installed then reset is triggered by run signal activation. If run pin is not installed rest is done by
power circle at 5V GPIO rail if power source is not present.