Raspberry Pi Sense Hat Support - cu-ecen-aeld/buildroot-assignments-base GitHub Wiki

Sense Hat Overview

The raspberry pi sense hat is a great add-on board for the raspberry pi. It attaches via the raspberry pi header pins and comes with easy to use libraries to help retreive, set, and calibrate data for the sense hat. The sense hat contains several sensors and I/O including the following:

  • 8x8 RGB LED matrix
  • 5 button joystick
  • Temperature sensor
  • Humidity sensor
  • Barometric pressure sensor
  • Gyroscope
  • Accelerometer
  • Magnetometer

You can find reference to the library's API here SenseHat API Installation instructions and guidance, not related to buildroot can be found here SenseHat Install

Here are a few links to purchase the product: RaspberryPi site purchase Amazon site purchase

Image of sense hat on bootup:

Source code helpful tips and links

Sense-hat python library

To install sense hat through buildroot you will want to get the library download from here:

Link to python library

You will be using the BLAKE2-256 hash from the website to install the library as an external package as shown in the sense-hat.mk file link below. You will see a reference to the SETUP_TYPE, this is found by locally extracting the tar.gz and looking in the setup.py file to see what setup tools are used, here the python "setuptools" is used.

Buildroot sense-hat.mk

RTIMU library additions

The RTIMU Library is not installed by default with the sense-hat package, and must be added for the sense-hat module to work in python. In order to install you must fetch the code from the RTIMULib github repository. RTIMULib Repository

It should be noted that the libraries setup files are not in root, and therefore buildroot cannot locate the setup.py when adding the package. To get around this one must add a PYTHON_FOO_SUBDIR to show where the setup.py is located. Please see the following links for examples and troubleshooting: RTIMULib Issue RTIMULib buildroot .mk file

Wheel library

Lastly, the sense hat needs the wheel library that is not provided in buildroot configurations. Similar to the sense hat setup you will need to create an external package with the latest wheel library. An example of adding the wheel package to buildroot can be found below: Wheel buildroot .mk file

Verified Sense Hat functionality

  • 8x8 LED matrix
  • Temperature sensor
  • Humidity sensor
  • Pressure sensor
  • Magnetometer
  • Accelerometer
  • Gyroscope

We have not verified joy stick functionality at this time.

Pull Request

A pull request with changes described here can be found at this link.