LED Projects: Light, Color and Animation with Arduino
LED projects are the alphabet of electronics: once you can light an LED, you've also learned digital outputs, resistor calculations and timing. Here you'll find everything you can do with light, from a single LED to RGB and addressable LED strips. To work out the LED's resistor, use the LED resistor calculator.

LED Blink
The very first hello of electronics: switching a single LED on and off. The Arduino turns the LED on and off at short intervals, so the light blinks quickly. You see in the simplest way how the board

Two LEDs Blinking Alternately
Two LEDs blink quickly in turn: when one lights up the other goes off, as if they were tossing a ball back and forth. The Arduino keeps each light on for a fifth of a second and then hands over to the

Traffic Light
A tiny copy of the traffic light you see on the road every day. Red stays on for two seconds, yellow flashes for a moment, green stays on for two seconds, then it goes back to red through yellow again

LED Police Lights
Just like the lights on a police car: the red LED flashes three times in quick succession, then the blue LED flashes three times, and the pattern keeps repeating without a break. All you need is two L

LED Chaser
Lights that switch on one after another, as if they were running. The Arduino lights six LEDs one at a time; each glows for a brief moment and goes out, so the light walks from start to end and then s

Knight Rider LED Effect
The classic scanner light: a dot of light slides from one end of six LEDs to the other and then comes back. The Arduino lights each LED for a tenth of a second before moving on, turns around at each e

LED Chaser with Adjustable Speed
Six LEDs light up one after another, so the light seems to run from one end to the other. Turn the potentiometer knob and the speed of that run changes instantly: one way and the light races along, th

Knight Rider LED Effect with Adjustable Speed
A light runs from one end of six LEDs to the other, turns around and runs back again. Turn the potentiometer knob and you change the speed of that run instantly: with the knob at one end the light alm

LED Control with a Push Button (Push)
Just like a doorbell: the light stays on as long as you press, and goes off when you let go. The Arduino keeps listening to the button; while it's pressed the LED is on, and the moment you lift your f

Toggle an LED with a Button (On/Off)
Press the button once and the light comes on, press it again and it goes off, just like the light switch in your room. The Arduino notices every press and flips the LED to the opposite state, waiting

Measuring Light Intensity with an LDR
Want to see how bright your room is as a number? The LDR, a small part that reacts to light, measures the light around it, and the Arduino writes the value to your computer screen every half second. C

Night Light with Ldr
A little night light that turns on by itself when it gets dark and goes off when morning comes. A light sensor measures how bright the room is, and the Arduino switches the LED on when it is dark enou

Led On/Off with IR Receiver and Remote Control
Like controlling three separate lamps without leaving your armchair: keys 1, 2 and 3 on the remote turn on the blue, red and green LEDs, and keys 4, 5 and 6 turn them off in the same order. The power

Control an LED from Your Phone via Bluetooth
A small rehearsal for switching the lights in your room on and off from your phone. The Bluetooth module passes the letters sent from your phone to the Arduino; one letter turns on the red LED, anothe

Using an RGB LED
Three colours hide inside a single LED: the RGB LED lights up red, then green, then blue, each colour on for half a second and off for half a second, before the cycle starts again. All you need is one

Smooth Color Transition with RGB Led
A single RGB LED drifts slowly from red to green, green to blue and back to red, looping through the rainbow without ever stopping. Each fade takes about two and a half seconds, and the yellow, turquo

One-Way Communication Between 2 Arduinos
You get two Arduinos talking over a single wire: press the button on one and the LED on the other lights up, press it again and it goes off. The sending board reports the button press with a short mes

Two-Way Communication Between 2 Arduinos
Two Arduinos are wired together and talk to each other: press the button on one and the light on the other comes on, press it again and it goes off. Both boards run the same program, so each one both

Led Control with Joystick
Push the little stick on the joystick all the way in any direction and the LED for that direction lights up: there are four different colours for right, left, up and down. Let go of the stick, it spri

LED Control with a 3x4 Keypad
With a keypad like the one on a phone, you control three separate lights. Keys 1, 2 and 3 turn on the green, blue and yellow LEDs, keys 4, 5 and 6 turn the same lights off, the star key turns them all

Using a WS2812B LED Strip
Meet a smart LED strip where you can colour every single light on its own. The Arduino first lights the first five LEDs red, a second later turns the other five blue, then switches them all off and st

Police Lights with WS2812B
You bring the red and blue lights from the roof of a police car right onto your desk. One half of a ten-LED WS2812B strip flashes red three times in quick succession, then the other half flashes blue

WS2812B LED Chaser
On a strip of ten LEDs, a green dot of light moves from start to finish one LED at a time, then jumps back to the beginning; it stays on each LED for a third of a second. On a WS2812B strip you contro

WS2812B LED Chaser (Fill Effect)
A light strip that fills up and empties like a glass of water. The Arduino lights ten color LEDs one by one in orange and keeps them on; once the strip is full, it switches them off one by one in the

WS2812B Knight Rider Effect
A red dot of light slides from one end of a smart LED strip to the other, then comes back, sweeping back and forth without ever stopping. At each step the Arduino lights just one LED, waits a tenth of

WS2812B Knight Rider Effect (3 LEDs)
All the colours of the rainbow glide slowly along a strip of 56 LEDs. Each LED glows in a slightly different colour from its neighbour and the colours keep flowing in the same direction, turning the s

WS2812B Animation 1
On a strip of 56 LEDs, all the colours of the rainbow line up side by side and flow without ever stopping, as if a river of light were gliding along the strip. Each LED glows in a slightly different c

WS2812B Animation 2
Set up a light show in your room that changes colors all by itself. The Arduino keeps colors flowing along a 30-LED strip and switches to a new color set every few seconds: rainbow, purple and green s

Smart Stair and Corridor Lighting
Step onto the stairs or into the hallway and the lights come on one step at a time in the direction you are walking. There is a distance sensor at each end; whichever one you pass, the eight LEDs ligh

Dot Matrix Clock and Calendar (MAX7219, DS1307)
A glowing board for your desk or wall that shows the time and date in scrolling text. The 8x32 LED display holds a big-digit clock whose two dots blink every second; at the start of each minute the da

Pixel Snake 8x8 Matrix
Build the classic snake game with your own hands and play it. On a colorful 8x8 light matrix, you steer a green snake with a joystick and eat red apples; with every apple the snake grows, speeds up a

Matrix Snake 16x16
The classic snake game, this time on a huge LED display made of 256 lights. You steer the green snake with a joystick and collect red apples; with every apple the snake grows, your score goes up on a

4x 32x8 Matrix LED Animation and Text
Stack four long LED matrix modules on top of each other and you get a square screen with more than a thousand dots of light. First, letters pour down from the top like rain in the movies, then a curta

4x 32x8 LED Matrix - 6-Animation Pack
Four 32x8 LED panels stacked on top of each other form a square screen where six animations play in turn: falling digital rain, a growing spiral, cells that are born and die all by themselves, ripplin

Arduino Memory Game (4 LEDs + 4 Buttons + Buzzer)
Do you trust your memory? Four colored LEDs light up in a sequence, each playing its own note, and you repeat the same order by pressing the buttons. Every correct round adds a new color to the sequen

LED Blink with ESP32
Teaches basic GPIO output usage with ESP32. We achieve a blinking effect by turning an LED on and off from a digital pin. ESP32 version of the classic blink project on Arduino UNO; the basic blink commands in the Arduino environment are the same, but the ESP32's pin layout and 3.3 V GPIO levels differ from those of the Arduino UNO.

ESP32 LED Control with Push Button (Push)
The LED lights up when the button is pressed and turns off when released. Shows how the ESP32's digital input pin and internal pull-up resistor are used. The INPUT_PULLUP mode eliminates the need for an external resistor.

ESP32 LED Control with Pushbutton (Toggle)
Each time the button is pressed the state of the LED changes: if it is on it turns off, if it is off it turns on. Classic toggle pattern. With debounce we clean up the mechanical noise of the pushbutton to ensure a single toggle with a single press.

ESP32 Built-in LED Blink
Blinking the built-in blue LED on the ESP32 DevKit V1. No external components required! The first project you should try when you buy an ESP32. GPIO 2 is connected to the built-in LED.

ESP32 Traffic Light
Real traffic light simulation with 3 LEDs red-yellow-green. Timings close to real traffic logic: red long, yellow short, green long. Classic example of sequential GPIO control.

ESP32 Knight Rider LED
6 LEDs moving sequentially from left to right and right to left (Knight Rider style). A basic example of using for loops and arrays. Teaches the logic of direction change.

ESP32 Police Strobe Light Effect
Simulate the strobe lights of a police car by rapidly flashing red and blue LED groups. Using 2 LEDs in each group makes the effect more dramatic. A classic example of fast toggle pattern and group control.

ESP32 LED Fade with PWM
Smoothly changing the brightness of the LED from 0 to max, from max to 0. We control PWM with analogWrite() as in Arduino - the same syntax as ESP32 Arduino Core 3.0+ works without problems. Pin definition + pinMode + analogWrite is enough.

ESP32 RGB LED Control
Unlimited color generation with a single RGB LED instead of 3 separate LEDs. As in Arduino, we make a rainbow transition by setting the R/G/B values with analogWrite(). Color theory (such as red+green=yellow) is seen practically.

ESP32 Night Light with LDR
Night light where the LED automatically turns on in the dark and off in the light. The D0 (digital out) pin of the LDR Sensor Module is used - the dark threshold is set with the small potentiometer on the module, the module itself generates the HIGH/LOW output. ESP32 just reads this signal with digitalRead(), the code is very simple.

Reading Light Intensity with the ESP32 LDR Module
Real-time monitoring of the LDR module's raw ADC value and relative light percentage calculated from dark and light reference values in the Serial Monitor. This percentage is not a lux measurement. Teaches the module’s calibration logic. It is ideal to complete this before Project 10, as it is used to determine the threshold value.

ESP32 LED Brightness Control with a Potentiometer (Analog → PWM)
In this project, we control the brightness of an LED analogically using a potentiometer. The ESP32's ADC pin reads the 0-3.3V voltage from the potentiometer, and this value is then converted into a PWM (Pulse Width Modulation) signal and sent to the LED. As a result, as you turn the potentiometer, the LED gradually brightens and dims. With Arduino Core 3.0+, analogWrite() can be used directly; on the ESP32-S2/S3, the ADC resolution is fixed at 12-bit.

Automatic Lighting with the ESP32 PIR Motion Sensor
In this project an HC-SR501 PIR motion sensor detects someone entering the room and turns on an LED automatically. millis() tracks how long the LED stays on: each HIGH reading refreshes the last-motion time, and the LED turns off at least 10 seconds after the last HIGH. The code also waits 50 ms with delay(50) in every loop, so the loop is not fully non-blocking. Great for stairs, hallways, bathrooms or closet lighting.
Blog
- BH1750 Arduino Light Sensor: Measure Lux with I2C (Full Guide)
- Raspberry Pi Pico Christmas Ornament: WS2812B NeoPixel Ring Star
- How to Use a Breadboard: Power Rails and Your First LED Circuit
- Music Reactive LED Arduino: WS2812B VU Meter Project
- Arduino RGB LED Strip Control: 12 V Color Mixing with MOSFETs
- NeoPixel Matrix Arduino: 8x8 and 16x16 WS2812B LED Panel Guide
- How to Calculate LED Resistor Value: Formula and Chart
- Christmas Tree LED Lights with Arduino: WS2812B Snow & Rainbow
- LilyPad Arduino: Wearable Electronics with Conductive Thread
- Arduino Christmas Projects: 12 LED, Sound and Light Ideas
- KY-008 Laser Module with Arduino: Laser Tripwire Alarm and Timer
- Arduino LED Cube: How to Build a 3x3x3 and 4x4x4 Cube with Code
- First Arduino Project Step by Step: A 4-Step Guide on Your Phone
- TCS3200 Color Sensor with Arduino: Wiring, Calibration and Code
- Arduino Projects Step by Step: How to Follow a Project Page
- Arduino Knight Rider LED Chaser: Circuit, Code and Speed Control
- Resistors in Series and Parallel: Formulas and Worked Examples
- Arduino Solar Tracker: Dual-Axis Build with 4 LDRs and Servos
- 555 Timer IC: Pinout, Astable and Monostable Circuits Explained
- 74HC595 Arduino Tutorial: Shift Register for 8+ LEDs on 3 Pins
- Arduino Traffic Light: Circuit, Code, Pedestrian Button, Junction
- WS2812B NeoPixel LED Strip with Arduino: Addressable RGB LED Guide
- Ohm's Law Explained: V = I × R, Power and LED Resistor Maths
- What Is an LDR Light Sensor? Measuring Light with Arduino and an Automatic Night Light
- How to Use an RGB LED: Color Mixing with Arduino, Common Anode vs Cathode
- What Is an LED? How It Works and How to Connect It to Arduino
