You can use require("Storage").write/readJSON to write/read data for later use.
However the magnetometer value will depend on what orientation you're in, so really it'd make more sense to do something like have a buttonpress 'reset' the zero value, so you can just press it before you start doing exercise.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
You can use
require("Storage").write/readJSON
to write/read data for later use.However the magnetometer value will depend on what orientation you're in, so really it'd make more sense to do something like have a buttonpress 'reset' the zero value, so you can just press it before you start doing exercise.