Magnetometer (Arduino) Serial Out To Processing

Circuit components for the Arduino board (I used a regular uno)

1. Adafruit Magnetometer HMC5883 model (Now Discontinued):

Sensor Diagram/Wiring Information:

2. PushButton Diagram (src:

Arduino & Processing Files I referenced

1. Adafruit Magnetometer HMC5883 model Arduino library:

2/3. Serial Call and Response in ASCII (Arduino – Processing Serial Communication)

My Arduino circuit
One magnetometer & two push buttons (as momentary switches) via the USB serial
(Photo & Wiring diagram will be here)

I don’t code very much, but here I am attempting –
For reference, I’d like to look at Dan Shiffman’s Processing lecture on youtube (Coding Train) – Some text& videos, I will look at will be

Basic Tutorial on Processing 3D (text):
Coding Challenge #58, 3D Earthquake Data Visualization:
Coding Challenge #11, 3D Terrain Generation with Perlin Noise in Processing:
Coding Challenge #26, 3D Supershapes:
Coding Challenge #8: Solar System in Processing – Part 2 (3D):
Coding Challenge #9, Solar System in Processing – Part 3

Files I merged & created from above (Using the handshake as given)
1. Arduino File:
2. Processing File: