The_Official_Raspberry_Pi_-_Beginner’s_Book_Vol1,_2018 (1)

(singke) #1
Chapter 7 Physical Computing with the Sense HAT 155

THE OFFICIAL RASPBERRY PI BEGINNER’S GUIDE


WARNING!
Hardware Attached on Top (HAT) modules should only ever be plugged into and removed
from the GPIO header while the Raspberry Pi is switched off and disconnected from its power
supply. Always be careful to keep the HAT flat when installing it, and double-check it is lined
up with the GPIO header pins before pushing it down.

Install the spacers by pushing four of the screws up from underneath the bottom of the
Raspberry Pi through the four mounting holes at each corner, then twist the spacers onto the
screws. Push the Sense HAT down onto the Raspberry Pi’s GPIO header, making sure to line it
up properly with the pins underneath and to keep it as flat as possible. Finally, screw the final
four screws through the mounting holes on the Sense HAT and into the spacers you installed
earlier. If it’s installed properly, the Sense HAT should be flat and level and shouldn’t bend or
wobble as you push on its joystick.
Plug the power back into your Raspberry Pi, and you’ll see the LEDs on the Sense HAT light up
in a rainbow pattern (Figure 7-1), then switch off again. Your Sense HAT is now installed!


5 Figure 7-1: A rainbow pattern appears when the power is first turned on


If you want to remove the Sense HAT again, simply undo the top screws, lift the HAT off –
being careful not to bend the pins on the GPIO header, as the HAT holds on quite tightly (you
may need to prise it off with a small screwdriver) – then remove the spacers from the Pi.

Free download pdf