Skip to content

A digital compass using the BBC micro:bit and a laser-cut compass rose

Notifications You must be signed in to change notification settings

seantibor/microbit-compass

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Microbit Compass Exercise

This demonstration of the micro:bit compass uses a laser-cut wooden compass rose to show degrees and cardinal directions.

Students can use the compass rose to help translate heading information from the micro:bit's onboard compass/magnetometer into cardinal directions using MakeCode or MicroPython. The sample programs provided turn the micro:bit LED array into a digital compass needle.

Learning Objectives

With this project, students will learn how to:

  • determine the orientation of the micro:bit in real space using the onboard compass/magnetometer
  • use the micro:bit LED array to show directional arrow or clock images
  • translate degree headings to cardinal directions
  • use a laser cutter/engraver

Project Files

  • microbit-compass.py - a MicroPython implementation of a simple compass needle
  • microbit-compass.js - a Javascript implementation of the compass needle that's compatible with MakeCode
  • Microbit Compass Rose.ai - an AI file with a 24 in x 12 in layout of eight compass roses. Suitable for printing on a Epilog Mini.

Compass Rose Tips

I used 1/8" or 3mm plywood for the compass rose. This allows the micro:bit buttons to sit nearly flush with the top of the plywood. I engraved with 600dpi recommended settings and had a high level of detail. Finally, I used double-sided tape to attach the micro:bit to the back of the compass rose.

Next Steps

Extension ideas:

  • create a treasure or scavenger hunt
  • compare the digital compass to an analog compass for accuracy
  • calculate the distance to a fixed point using readings from known points and trigonometry
  • make a sundial using the micro:bit to orient it to the right direction

Attribution

Compass source code from micro:bit site

Compass rose adapted from Handaxe_Maker's micro:bit compass.

Note: micro:bit compass by Handaxe_Maker is licensed under the Creative Commons - Attribution license.

Example Photos

Micro:bit and compass rose cut from 3mm plywood Micro:bit inserted into compass rose