Thats Ace! Thanks @Gordon! Yes you nailed it , just polling with a set interval as you showed and yes I've got a 2.1a as well. I didnt give a proper test yet by calling Puck.magOn() but i did just try using the cutting edge build and it now seems to be working as expected!
Ill give shoot with using Puck.magOn() as well as I think that might be better in the long run for me. Would this "slower startup" cause eventually cause issues if you called Puck.mag() too quickly? Im fairly fresh to messing with this so far but didnt know if it would be more power efficient to leave the magnometer on for an extended period or just get single calls over a quick interval.
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.
Thats Ace! Thanks @Gordon! Yes you nailed it , just polling with a set interval as you showed and yes I've got a
2.1a
as well. I didnt give a proper test yet by callingPuck.magOn()
but i did just try using the cutting edge build and it now seems to be working as expected!Ill give shoot with using
Puck.magOn()
as well as I think that might be better in the long run for me. Would this "slower startup" cause eventually cause issues if you calledPuck.mag()
too quickly? Im fairly fresh to messing with this so far but didnt know if it would be more power efficient to leave the magnometer on for an extended period or just get single calls over a quick interval.Thanks again!