This is a basic tutorial for beginners to learn about the Arduino UNO / programming
Step 1: Build your Circuit

Step 2: Upload the Code
You can find the code below
Step 3: Try It!
Start your program and press Ctrl + Shift + M to open the serial monitor.
Try turning the lights on and off to see the serial monitor change.
Make sure to comment down below if you have any questions!
EXPANDED TECHNICAL DETAILS
Optical Intensity Analytics
This project provides a precise way to monitor ambient light levels for automation and energy-saving applications.
- Cadmium-Sulfide (CdS) Voltage Divider: Uses a photoresistor in series with a fixed resistor. The Arduino monitors the analog midpoint; as light intensity increases, the resistance drops, and the voltage changes proportionately.
- Lumen-Equivalent Calculation: (Advanced version) The firmware applies a logarithmic formula to approximate the actual "Lux" level of the environment, displaying the results on a Serial terminal or an I2C LCD.
Prototyping
- Web Editor verified: The code was optimized using the Arduino Web Editor, providing seamless cloud storage and easy sharing of the light-sensing logic.