InitialDataTestv3.ino

Ideally, the arduino would get 10 initial values on startup and use that to create a baseline. Then it uses the baseline to determine when the magnet is near, because the baseline changes.
This is the sketch that alternates between good data and mystery numbers every other read.
Modified from Sparkfun's magnetometer sample code.

ino - 2.61 kB - 09/30/2016 at 02:19

Download

FatCatv3.ino

Testing the magnetometer to see if it can get sensible data. This is the sketch which gets good data, which changes sensibly when you move a magnet closer, but never returns to baseline when you remove the magnet.
Modified from Sparkfun's magnetometer sample code.

ino - 2.16 kB - 09/30/2016 at 02:18

Download