Both versions of sun sensor have some integration time that needs to happen until a new lux value is returned. Currently the sun sensors just return the same value if called multiple times within its integration time. When the sensor is ready to return a new value, return the value with some flag that indicates it is a new value. In the OPT3001 sun sensor, the rdy property indicates that there is a new value to be returned.
Both versions of sun sensor have some integration time that needs to happen until a new lux value is returned. Currently the sun sensors just return the same value if called multiple times within its integration time. When the sensor is ready to return a new value, return the value with some flag that indicates it is a new value. In the OPT3001 sun sensor, the rdy property indicates that there is a new value to be returned.