Strange the high and low changes with battery vs plug
Yes that's is probably the downside of this sensor. Due to its circuit, the sensor output may be a function of VCC. You could try to power it through an LDO (low dropout regulator).
Or you can also monitor its voltage through a resistor divider an compensate digitally ?
Anyway, good to know that you finally got it work!
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.
Yes that's is probably the downside of this sensor. Due to its circuit, the sensor output may be a function of VCC. You could try to power it through an LDO (low dropout regulator).
Or you can also monitor its voltage through a resistor divider an compensate digitally ?
Anyway, good to know that you finally got it work!