Setting up the Raspberry Pi for Juice4halt

This procedure was tested with the Raspberry Pi 2 and Raspberry Pi Model B+, OS Raspbian installed from NOOBS v1.3.4

  • The script file does not require the I2C interface for communication. Only one GPIO pin (default GPIO25) is used for bidirectional communication between Juice4halt and Raspberry Pi.

Setting up auto-running the script on start up

  • Create the following folder:
mkdir /home/pi/juice4halt/bin/
  • Download the script file shutdown_script here, and copy it into the created folder.
  • Open the file:
sudo nano /etc/rc.local
  • Add the following line before the exit 0 in the last line:
/home/pi/juice4halt/bin/shutdown_script &
  • Save the file.
  • Make the shutdown_script file executable by typing the following command:
sudo chmod 755 shutdown_script

Source:

http://raspberrywebserver.com/serveradmin/run-a-script-on-start-up.html

http://www.raspberry-projects.com/pi/pi-operating-systems/raspbian/scripts