Qwiic Micro Magnetometer - MMC5983MA Hookup Guide

Pages
Contributors: Ell C
Favorited Favorite 2

Example 3: I2C Continuous Measurement

Example 3 demonstrates how to use interrupts to quickly read the sensor instead of polling. To find this example, go to File -> Examples -> SparkFun MMC5983MA Magnetometer Arduino Library -> Example3-I2C_Continuous_measurement.

Image shows menu pulldown as described above

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:

Select the SparkFun RedBoard and the correct COM port

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 compass readings start printing out.

Serial Monitor Output

Having a hard time seeing the image? Click the image for a closer look.