Hi, Looks like the module itself is definitely not good then! Thanks for poking around.
This won't work, because it's just writing 8 bits:
i2c.writeTo(adr, [REG.CONFIG, 0b1100110000010000]);
Try
i2c.writeTo(adr, [REG.CONFIG, 0b11001100, 0b00010000]);
It might work after that?
Getting the result data should be easy enough, something like:
var lux = 0.01 * ((d&0x0FFF) << (d>>12))
might work?
@Gordon started
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.
Hi, Looks like the module itself is definitely not good then! Thanks for poking around.
This won't work, because it's just writing 8 bits:
Try
It might work after that?
Getting the result data should be easy enough, something like:
might work?