mcci-catena / Catena-Arduino-Platform

Arduino platform library for MCCI Catena IoT Systems
MIT License
12 stars 11 forks source link

Si1133 Light sensor reports bogus UV values #209

Closed terrillmoore closed 5 years ago

terrillmoore commented 5 years ago

The SI1133 reports either 0 or full-scale positive for UV. Regardless of the lack of calibration, this is a bad thing; we should report something that scales properly and responds to external inputs.

Review of the code against SiLabs sample code shows that our UV configuration was very different. Review against the datasheet shows that we don't properly set up for forced mode (with the measure counter index set to zero). In force mode, we should use the IRQ register to know when we're done; so we need a polling routine to check it.