Set up Sense HAT inputs in Scratch 3
Les Pounder shows how to obtain data and control sprites using the Sense HAT add-on board with Scratch 3.
OUR EXPERT
Les Pounder is associate editor at Tom’s Hardware and a freelance maker for hire. He blogs about his projects at bigl.es.
T his month we’ll use the scientific powerhouse Sense HAT board with Scratch 3 to create four quick projects to demonstrate the power of Scratch 3 and the Sense HAT.
The Sense HAT is a remarkable board. Released in 2015, it works with Python, Node-RED and for this tutorial it works with Scratch 3 thanks to a special palette of blocks that enable anyone to use the sensors, display and joystick with very little coding knowledge.
With the power off, connect the Sense HAT to all 40 pins of the GPIO, ensuring that the board fits neatly over the Pi. Use the brass standoff, provided with the Sense HAT to fix the board firmly in place. Connect your peripherals and then power up the Raspberry Pi to the desktop.
Scratch 3 should come pre-installed on your Raspberry Pi OS image, but just in case it’s missing it can be installed from the main menu, under Preferences>Recommended Software. Scratch 3 is found in the Programming category: place a tick in the box and click Apply to install. Once installed, Scratch 3 can be found in the main menu under Programming.