7NeoPixel Compass

In this chapter we’ll use a three-axis sensor and an RGB LED ring to create a compass that indicates north by lighting the LEDs in that direction.

Image
Image

PARTS REQUIRED

Arduino board

Jumper wires

HMC5883L three-axis sensor

Adafruit NeoPixel ring with 16 RGB LEDs

9V battery pack with 6 AA batteries

LIBRARIES REQUIRED

Wire

FastLED

HMC5883L

HOW IT WORKS

The HMC5883L three-axis sensor (Figure 7-1) is a multichip module that senses magnetic force. The module measures both the direction and the magnitude of Earth’s magnetic fields. We will ...

Get Arduino Project Handbook, Volume II 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.