Here’s a second simple plug which works:
(the silkscreen markings are incorrect, this plug responds to I2C addresses 0x29, 0x39, or 0x49)
The Lux Plug measures incident light intensity which can be converted to a 16-bit Lux value in the range 1 .. 65535. A 16x multiplier can be used to increase the dynamic range to 20 bits.
A class named – surprise! – “LuxPlug” has been added to the Ports library, as well as a “lux_demo” sketch:
The two first values are the raw readings from two internal sensors. The TAOS datasheet explains how to derive the Lux value from them. This calculation is included as the “calcLux” member in the class (to be called after getData() has obtained a reading).