# Dimmer LED

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

Turn a potentiometer to fade an LED smoothly using PWM on the ESP32. Teaches analog-to-digital conversion and duty-cycle control in one evening.

## How it works

Turning the potentiometer changes a voltage that the ESP32 digitizes with its ADC. That number is scaled into a PWM duty cycle — the fraction of each cycle the LED stays powered. Your eyes perceive the rapid on-off switching as smooth brightness.

## What you'll learn

- PWM duty cycle
- ADC resolution and scaling
- Potentiometer as analog input
- Perceived brightness vs duty

Full project (code, wiring diagram, Wokwi simulation): https://github.com/kritishmohapatra/100_Days_100_IoT_Projects/tree/main/Dimmer_LED_using_Potentiometer_(MicroPython)

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