I created a driver for TSL2560/61 (for the TSL256X family of Light-to-digital convertors)

I was planning for some time to get started with converting my office lights to a Nerves based solution. One of the things I had to do was check the current light levels so my motion-detected lights do not turn on when it isn’t dark. Talking with @lawik sometime ago he pointed me to the VCNL4040 for which he made a package. So I ordered it as Grove-enabled, received it, put it on my shelf and left it there…
Until yesterday, when I disconnected the fleet Nerves devices and repurposed one of the RPi5, connected the Grove Base Hat and unpacked the light sensor only to find it is TSL2561 based.

There was no package for this yet on hex, so I checked the microPython lib and the datasheet and created my first sensor-package tsl256x.

I hope someone has such a sensor and can test it.

4 Likes

Nice!
I don’t have one unfortunately so can’t try it. Another driver down though :white_check_mark:

1 Like