This Raspberry Pi HAT features an 8×8 RGB LED matrix, a five-button joystick and a number of sensors.
The Sense HAT is a sensor-laden, add-on board for the Raspberry Pi that will soon be headed into space as part of the Astro Pi mission.
For those familiar with the initiative, Astro Pi is a collaboration between Raspberry Pi, British astronaut Tim Peake, UK Space and the European Space Agency that was formed to offer students a chance to devise their own experiments and run them in space. In December, a pair of RPi computers will be connected to a new Astro Pi board and sent to the International Space Station. During the mission, the astronaut will deploy the units in a variety of locations onboard the ISS, load up the winning codes while in orbit, set them running, collect the data generated and then download this to Earth where it will be distributed.
As for the Sense HAT, the board is packed with a gyroscope, an accelerometer, a magnetometer, a temperature sensor, a barometric pressure sensor and a humidity sensor, as well as a five-button joystick and an 8×8 RGB LED matrix — all powered by an LED driver chip and an ATTiny88 MCU running custom firmware. By attaching the board to your Pi’s GPIO pins, Makers can use the integrated circuit-based sensors for any number of experiments, apps and games. Raspberry Pi has also devised a Python library for easy access to everything on the HAT.
“The Sense HAT was originally developed around James Adams’ idea to make a cool toy-style board that showed off just how much you could do with your average modern MEMS gyroscope, 64 RGB LEDs and some Atmel microcontroller hackery,” the team writes. “Somewhere between prototype and production, it seems to have attracted extra features like a pressure sensor, a humidity/temperature sensor and a teeny joystick.”
The LED matrix will provide a feedback mechanism and enhanced interactivity for astronaut Tim Peake when he’s tasked with deploying the Astro Pi board on the ISS. One of the winning entries – Reaction Games – has even programmed a whole suite of joypad-operated games played via the LED matrix. According to the Raspberry Pi crew, Snake is hilarious on an 8×8 screen!
“The Atmel [MCU] is responsible for sampling the joystick. We didn’t have enough pins left on the Atmel to dedicate the five that we needed to sample the joystick axes independently, so they’ve been spliced into the LED matrix row selects. The joystick gets updated at approximately 80Hz, which is the scan rate of the LED matrix,” its creators explain. “All of the sensors (and the base firmware for the Atmel) are accessible from the Pi over I2C. As a fun bonus mode, the SPI peripheral on the Atmel has been hooked up to the Pi’s SPI interface – you can reprogram your HAT in the field!”
Intrigued? Head over to the Raspberry Pi blog, where you will find an elaborate log of the Astro Pi mission.