I called it exactly as above, not with the forceSoft option.
I tried different timeouts; 50ms seemed the minimum in my code to get consistency. I'm fine with a 1/20 second reading in my use case. You also mention not taking more than 5 readings/second, so that's a gating factor, anyway.
You could also have a highAccuracy option (or simple Boolean) in Puck.light(), that when present, adds a bit more delay.
I'm using this, BTW, in a kitchen-sink app that exercises all the sensors, incl NFC, and the RGB LEDs. I'll share that here soon.
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.
I called it exactly as above, not with the
forceSoft
option.I tried different timeouts; 50ms seemed the minimum in my code to get consistency. I'm fine with a 1/20 second reading in my use case. You also mention not taking more than 5 readings/second, so that's a gating factor, anyway.
You could also have a
highAccuracy
option (or simple Boolean) inPuck.light()
, that when present, adds a bit more delay.I'm using this, BTW, in a kitchen-sink app that exercises all the sensors, incl NFC, and the RGB LEDs. I'll share that here soon.