4MAGICAL MAGNETISM
As you saw in Chapter 1, the micro:bit has a built-in magnetometer that serves a variety of purposes. In this chapter, we’ll use it to turn your micro:bit into a compass that tells you which direction you’re facing. We’ll also measure the magnetic fields of neodymium magnets. Then, we’ll make a magnetic alarm that rings whenever someone opens the door.
PROJECT: COMPASS
Difficulty: Easy
In this project, shown in Figure 4-1, you’ll use the micro:bit’s built-in magnetometer as a compass. It will display an arrow on the screen that ...
Get Micro:bit for Mad Scientists now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.