如果在 raspberry pi 上面要用 light sensor ,可以使用 LT2561
接線可以參考這篇 https://electropeak.com/learn/interfacing-tsl2561-luminosity-sensor-with-arduino/
基本上就是把 I2C 與 VCC/GND 接上就可以用了,I2C address 是 0x39
Python 的 code 可以參考這篇 https://github.com/ControlEverythingCommunity/TSL2561/blob/master/Python/TSL2561.py
執行結果:
