Skip to content

1David22/Arduino_LED_Controller

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Arduino_LED_Controller

Simple LED brightness control using PWM on Arduino Uno.

This project demonstrates how to control the brightness of an LED using Pulse Width Modulation (PWM) on an Arduino Uno.

⚙️ Description

The LED smoothly fades in and out by changing the PWM duty cycle on digital pin 9.
This technique simulates analog output by rapidly switching the LED ON and OFF at different intervals.

🔧 Components

  • 1x Arduino Uno (or compatible board)
  • 1x LED
  • 1x 220 Ω resistor
  • Jumper wires

⚡ Circuit Connections

  • Pin 9 → LED anode (long leg)
  • LED cathode (short leg) → resistor → GND

🧠 How It Works

The Arduino sends a PWM signal (0–255 duty cycle) through pin 9.
The analogWrite() function adjusts how long the signal stays ON versus OFF.
As the duty cycle increases, the LED appears brighter; as it decreases, it dims.
This loop creates a smooth fade effect.

About

Simple LED brightness control using PWM on Arduino Uno.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages