Project 2: Light-Sensing Night Light With a Photoresistor
Use a photoresistor, a 10kΩ resistor, an LED, and a 220Ω resistor. Create a voltage divider so the analog pin reads changing light levels. Hold your hand over the sensor and watch values shift in the Serial Monitor.
Project 2: Light-Sensing Night Light With a Photoresistor
Read analog values, pick a threshold, and turn the LED on when readings drop. Add a little hysteresis to avoid flicker. Share your threshold values and room conditions so others can compare and calibrate theirs.