Projects / Ideas / Digital spirit level on a Sense HAT

Digital spirit level on a Sense HAT

BeginnerLearningIdeaReviewed
In short

How do you build a digital spirit level on a Sense HAT?

A Pi and a Sense HAT show a bubble that moves on the LED grid as you tilt it. You need Raspberry Pi 4 Model B (4 GB), Raspberry Pi Sense HAT, SanDisk microSD card 32 GB (A1, Class 10) and Raspberry Pi 27 W USB-C power supply.

Level
Beginner
Time
About 150 min
Parts
4
An idea, not a guided build yet. Goal, parts and steps; no wiring, code or tests. Copy it to My Garage to plan it.
Goal

Read tilt on a Pi.

How to build it

  1. Set up the Pi and the HAT
  2. Read the accelerometer
  3. Map tilt to a dot
  4. Show the dot on the grid
  5. Add a level beep or colour

Related projects

Common questions

What parts do I need for the digital spirit level on a Sense HAT?

Raspberry Pi 4 Model B (4 GB), Raspberry Pi Sense HAT, SanDisk microSD card 32 GB (A1, Class 10) and Raspberry Pi 27 W USB-C power supply.

How long does the digital spirit level on a Sense HAT take to build?

About 150 minutes for a beginner maker.