Night light
The darker the light sensor reads, the brighter the LED — the brightness is an analogWrite duty cycle.
Input
ldrAnalogChecklist
Why this support circuit is added
Light level via analogRead; the divider's top sits on the MCU's ADC rail.
Grounded in the catalog and golden patterns (real open-source circuits). Every auto-inserted part comes with a reason.
Using this part in a project adds the circuit below, each element with its reason.
An LDR alone produces no voltage; a 10 kΩ to GND forms the divider the ADC reads (Adafruit Photocells).
Code alone can't reveal this part, so it lives on the module checklist. When added, it is bound to a free sketch pin with a matching direction.
Run them in the browser, no login needed.
The darker the light sensor reads, the brighter the LED — the brightness is an analogWrite duty cycle.
The IR remote's +/- drives a 12 V fan; it halves itself when the room goes dark.