Qwiic Micro Magnetometer - MMC5983MA Hookup Guide
Contributors:
Ell C
Example 1: I2C Simple Measurement
Now that we've got our library installed and our hardware all hooked up, let's look at some examples.
This first example just does some basic measurements. To find Example 1, go to File -> Examples -> SparkFun MMC5983MA Magnetometer Arduino Library -> Example1-I2C_Simple_measurement.
Having a hard time seeing the image? Click the image for a closer look.
Make sure you have the correct board and port selected. For this tutorial, your selections should look something like this:
Having a hard time seeing the image? Click the image for a closer look.
Once you're ready to go, go ahead and hit the upload button (the right facing arrow button under the "Edit" menu item). Once your code is uploaded, open the Serial Monitor and you'll see X, Y, and Z values start printing out.
Having a hard time seeing the image? Click the image for a closer look.