@allObjects your real star. Thanks so much for taking the time to dig this one out. So poor assumptions on my part didn't help. I made the fixes to inline code @Gordon used initially (it was a straight port from Arduino Lib). As for modifying the module I can't even find it on Git let alone fork it!
For the optimization I will leave that to @Gordon.
One thing Lines 80..84: think it's best to return the raw value and allow user to scale to suite.
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.
@allObjects your real star. Thanks so much for taking the time to dig this one out. So poor assumptions on my part didn't help. I made the fixes to inline code @Gordon used initially (it was a straight port from Arduino Lib). As for modifying the module I can't even find it on Git let alone fork it!
For the optimization I will leave that to @Gordon.
One thing Lines 80..84: think it's best to return the raw value and allow user to scale to suite.
Thanks again
Lawrence