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: https://learn.adafruit.com/adafruit-hmc5883l-breakout-triple-axis-magnetometer-compass-sensor/wiring-and-test

2. PushButton Diagram (src: https://www.arduino.cc/en/Tutorial/Button)

Arduino & Processing Files I referenced

1. Adafruit Magnetometer HMC5883 model Arduino library: https://github.com/adafruit/Adafruit_HMC5883_Unified

2/3. Serial Call and Response in ASCII (Arduino – Processing Serial Communication)
https://www.arduino.cc/en/Tutorial/SerialCallResponseASCII

—-
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): https://processing.org/tutorials/p3d/
Coding Challenge #58, 3D Earthquake Data Visualization: https://www.youtube.com/watch?v=dbs4IYGfAXc
Coding Challenge #11, 3D Terrain Generation with Perlin Noise in Processing: https://www.youtube.com/watch?v=IKB1hWWedMk
Coding Challenge #26, 3D Supershapes: https://www.youtube.com/watch?v=akM4wMZIBWg
Coding Challenge #8: Solar System in Processing – Part 2 (3D): https://www.youtube.com/watch?v=dncudkelNxw
Coding Challenge #9, Solar System in Processing – Part 3 https://www.youtube.com/watch?v=FGAwi7wpU8c

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

Reference: https://github.com/processing/processing/wiki/Common-Errors