# Auto Night Light

Day 1 of the 100 Days 100 IoT Projects collection. Board: ESP32.

An ESP32 reads ambient light through an LDR and switches an LED on automatically after dark. A gentle first project covering analog input and threshold logic in MicroPython.

## How it works

A light-dependent resistor forms a voltage divider whose output falls as the room darkens. The ESP32 reads that voltage through its analog-to-digital converter and compares it against a threshold. When the reading drops below the threshold, the board switches the LED on; when daylight returns, it switches off again.

## What you'll learn

- ADC analog input
- Voltage divider circuits
- Threshold-based switching
- Hysteresis to prevent flicker

Full project (code, wiring diagram, Wokwi simulation): https://github.com/kritishmohapatra/100_Days_100_IoT_Projects/tree/main/Auto_Night_Light_using_LDR_(ESP32_+_MicroPython)

Summary by SkillShop. Code and diagrams belong to the original repo.
