UncleRus / esp-idf-lib

Component library for ESP32-xx and ESP8266
https://esp-idf-lib.readthedocs.io/en/latest/
1.39k stars 437 forks source link

Offset with Veml7700 driver #533

Closed Throows closed 1 year ago

Throows commented 1 year ago

The issue

Hi, I noticed a bug with the veml7700 driver. I tried to calibrate my VEML7700 component from a reference lux meter, but I have noticed the veml gives a result 10 times higher than the real value. There is a bug in the formula to convert step to lux.

Which SDK are you using?

esp-idf

Which version of SDK are you using?

v5.1-dirty

Which build target have you used?

Component causing the issue

veml7700

Anything in the logs that might be useful for us?

No response

Additional information or context

I have made research and I found the minimal resolution for the VEML7700 is 0.0036 step/lux (Application note Page 5) Actually on the driver the minimal resolution is 0.036 ( raw * 36 / 1000). so the define VEML7700_RESOLUTION_800MS_IT_GAIN_2_DIV is wrong

I can provide more information if needed.

Thank you, Romain

Ressources :

Application Note

Confirmation