Light sensor values

Hi there (and happy Eastern),

I’d like to know more detail about what values the light sensor emits.

I’m seeing values ranging from 0 (lights off) to about 100 (lights on) to literally OVER 9000 (when I force-feed the sensor with my very, very bright LED torch).

Is that value aligned to any real scale or unit (ANSI Lumen, etc)?

About what I’m trying to do:
I’ve written a python script for a weather station, that also utilizes the unicorn-hat to display temperature. I’m pulling additional external weather data via and I’d like to generate something representing the light value from the dataset to store in a timeline in redis.


probing the module over serial this is what you can extract for your purpose:

I’m not sure what the current Python API returns tbh… and whether it will be affected by the shipshape update. @gadgetoid ?

1 Like

Thank you for the information. I am already using the shipshape-branch of flotilla-python I can’t clearly remember why, but there was an issue with one of the devices. It certainly looks like it should™ be the lux-value from what I can tell. It is certainly only one value that is returned by the light-method.

I’m not sure, it looks like the raw visible light level to me, i.e the first in the triplet. Hence why I’m not sure if it’s awaiting an extension that may make your code break if you relied on the API as it exist today (shipshape is as much a WIP as the one compatible with the original firmware right now).