What it is: The TEMT6000 is a simple analog light sensor whose output rises with brightness. Its response is tuned to visible light like the human eye, making it a nicer analog light sensor than a bare LDR.
How it works: The breakout is basically a phototransistor feeding a load resistor, so the SIG pin gives a voltage proportional to light. Read it with the ESP32 ADC. This sketch maps the reading to a friendly 0–100 % brightness.
Wiring:
TEMT6000 SIG -> GPIO0 (analog)
TEMT6000 VCC -> 3V3
TEMT6000 GND -> GND
OLED VCC=3V3, GND=GND, SDA=GPIO4, SCL=GPIO5
Libraries: only "Adafruit SSD1306" and "Adafruit GFX Library".
On screen / Serial: brightness as 0–100 % plus the calibrated millivolts. Shade it vs shine a torch to see the swing.
Gotchas: It's a relative sensor, not calibrated lux — for real lux use the BH1750 or TSL2561. GPIO0 is a boot-strap pin; safe to read but don't hold it low during reset.