Sense HAT

Python module to control the Raspberry Pi Sense HAT


The Sense HAT features an 8x8 RGB LED matrix, a mini joystick and the following sensors:

  • Gyroscope
  • Accelerometer
  • Magnetometer
  • Temperature
  • Humidity
  • Barometric pressure


Install the Sense HAT software by opening a Terminal window and entering the following commands (while connected to the Internet):

sudo apt-get update
sudo apt-get install sense-hat
sudo reboot


Hello world example:

from sense_hat import SenseHat

sense = SenseHat()

sense.show_message("Hello world!")

See the API reference for full documentation of the library's functions. See examples.


This library is maintained by the Raspberry Pi Foundation on GitHub at

See the changelog.