Arduino Analog + Digital Compass with HMC5883L sensor

Electronic version of the Compass, where the position of the needle is indicated by group of a three light-emitting diodes. There is also an OLED display in the middle of the device, which shows the angle relative to the North Pole.

Jul 6, 2023

5139 views

1 respects

MIT

Components and supplies

1

HMC5883L Magnetic Sensor

1

Ring with 60 RGB WS2812 LEDs and integrated driver

1

Arduino Nano

1

SSD1306 OLED Display

Tools and machines

1

Arduino IDE

1

Soldering kit

Apps and platforms

1

Arduino IDE

Project description

Code

Code

cpp

Arduino code

Downloadable files

Schematic

Circuit diagram

Schematic.jpg

Comments

Only logged in users can leave comments

dl3jan

6 months ago

which exact hmc5883 lib are u using? got an error during compile saying that compass.setOffset requires 3 parameters. added a 0 as 3rd parameter and then compilation worked

oz7aff

10 months ago

Mine is showing 180 deg. wrong. Any hint on solving this?