Frida, ClearMemory041063 and Ollie,
Will give these ideas a try... I think I tried ClearMemory041063's suggestion of dropping the ".js" with the same result, but will try tomorrow - left my puck at work by accident :(.
Hi - I can't seem to get the Vec3 module to load.
require("https://www.espruino.com/modules/Vec3.js"); //no errors
var strength = new Vec3(xyz).sub(zero).mag(); //throws uncaught referenceerror about Vec not being defined.
Not sure what is up...
I noticed that if the Puck is started next to a magnet, the magnetometer values are "off". If I push my program back down to the Puck (after moving it away from the magnetic source, the magnetometer goes back to "normal". How, in code, do I force a reset/recalibration of the magnetometer - basically simulated the restarting of the unit?
© Espruino, powered by microcosm.
Report a problem