Table of Contents

Raspberry Basic Hat


That's the pure reduced simple Basic Hat for the Raspberry Pi. If one just needs a reset button, a control LED and a switch, that is the right board.
It has an Reset-Button (GPIO 22) and a GPIO LED (GPIO 27). On GPIO 18 is a switch.


Paper PCB


raspberry_basic_hat_02.zip


Parts


Install the Shutdown Button and the LED

Make a folder:

$ mkdir /home/pi/basic-hat

Go to your Paper-Duino-Pi folder

$ cd /home/pi/basic-hat

Download the Python script:

$ wget http://www.dernulleffekt.de/programme/paperduinopi_v05/shutdown_and_blink_01.tar.gz

And unpack it:

$ tar xf shutdown_and_blink_01.tar.gz

Change owner & rights

$ sudo chown root:root shutdownbutton_hat.py blink_hat.py
$ sudo chmod 755 shutdownbutton_hat.py blink_hat.py

Create the autostart:

  $ sudo nano /etc/rc.local

Write before “exit 0”:

printf ">>>>>>>> BASIC-HAT by dernulleffekt.de\n"           

# run reset and shutdown script
printf ">>>>>>>> Starting shutdown aund reset button on GPIO 22\n"
/home/pi/basic-hat/shutdownbutton_hat.py & 

# blink an LED
printf ">>>>>>>> Starting blinking LED on GPIO 27\n"
/home/pi/basic-hat/blink_hat.py &

To save and leave press: CTRL+O, Enter, CTRL+X
Reboot:

$ sudo reboot

License

The Raspberry Basic Hat was designed by Wolfgang Spahn 2017.
It is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Creative Commons License