Master Your Micro:bit with Arduino IDE —— Accelerometer & Magnetometer
Magnetometer Lets start with the magnetometer chip, the MAG3110. Click here to download: MAG3110 Datasheet We can talk to the chip using an Arduino library. You can download "Sparkfun's library" by clicking the button below! Download Sparkfun MAG3110 breakout library Restart the IDE. Now you can upload some examples. I suggest starting with the Basic example which is replicated below [cceN_cpp theme="dawn"] /* ********************************************* * SparkFun_MAG3110_Basic * Triple Axis Magnetometer Breakout - MAG3110 * Hook Up Guide Example * * Utilizing Sparkfun's MAG3110 Library * A basic sketch that reads x y and z readings * from the MAG3110 sensor * * George B. on behalf of SparkFun Electronics * Created: Sep 22, 2016 * Updated: n/a * * Development Environment Specifics: * Arduino 1.6.7 * * Hardware Specifications: * SparkFun MAG3110 * Bi-directional Logic Level Converter * Arduino Micro * * This cod...