Not the smartest move.I would like to use a photocell to read the ambient brightness.
LDRs (Light Dependent Resistor) usually contain Cadmium, which is very harmful for the environment. The ROHS exemptions will expire some day.
Look for "ambient light sensors". These are silicon based and designed to reflect the sensitivity of the human eye. Many of them have digital outputs.
Example:
https://ams-osram.com/products/sensor-s ... ght-sensor
https://look.ams-osram.com/m/c901de8e97 ... 000338.pdf
There is also a complete board:
https://www.waveshare.com/wiki/TSL25911_Light_Sensor
No ADC needed, just direct connections to +3V3, GND and GPIO2 (SDA1) and GPIO3 (SCL1).
Statistics: Posted by fchk — Wed Aug 27, 2025 6:57 pm