GY-282 COMPASS Arduino and Processing

Hello world! Today i made a Compass for a PC or Laptop with the GY-282 COMPASS, arduino & Processing. It’s very easy to build! I used the GY-282/HMC5983 Magnetometer. I did not calibrate my Magnetometer, it’s just a example. You should calibrate your Magnetometer in order to get the right directions.

In this project we use processing and arduino.
Get processing here if you don’t have it . Download Processing


Just wire it up like the Schematic, Upload the codes,Run the Processing code By pressing the play button and it should pop up the GY-282 COMPASS on your screen.

Parts list:
Arduino uno.
HMC5983 Magnetometer (Others such as the HMC5883l work to)

Make sure you have the images for the GY-282 COMPASS from “GY_232_Compass –” in the right map, They should be in the same map as the Processing code. So at documents/processing/GY_232_Compass for example.

Download the processing files & fritzing file below.
GY_232_Compass –
HMC5983 GY-282 Arduino & Processing COMPASS.fzz

The connections are as following.
GND to GND arduino
VIN to 5V Arduino
SCL to SCL arduino
SDA to SDA arduino

Other pins are not used.

Good luck!

GY-282 COMPASS Arduino Code:

GY-282 COMPASS Processing code:

Danny van den Brande

Programmer, Game Designer, 3D Designer, Web Designer, Graphic Designer. Jup this website looks crappy.. :) But enjoy the projects! Everything you need is here.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.