LED projects for Arduino, ESP32 and Pico
278 Mokxi projects use an LED (141 beginner, 100 intermediate and 37 advanced). They run on Arduino Uno and ESP32 boards, and 32 need no board at all. Here are 24, from “Relay module on pin 8” to “An ESP32 and an Arduino Uno talking over serial”. Each card says what the project does, the board and parts it needs and its level, and Open in the simulator runs it in your browser in one click, with no account.
How to pick your first one
- Start with “Blink, with a breakpoint”, a beginner project that needs a resistor and an LED.
- Arduino Uno runs 142 of them, ESP32 43 and 32 need no board at all. Start on the board you have, or on an Arduino Uno if you are buying one.
- The parts used most here are the push button (89 projects), the potentiometer (38) and the piezo speaker (31). With those on hand, most of this list is open to you.
- Before you build one on a real bench, read the LED wiring guide for your board below. It gives every pin and the voltage notes.
24 projects of 278

Relay module on pin 8
A relay module on pin 8 clicks on and off every two seconds; its contact switches an LED.
- Board
- Arduino Uno R3
- Parts
- Resistor, LED, relay module
- Level
- Beginner

ESP32-C3 PWM fade
Breathes an LED on GPIO 4 and the on-board one on GPIO 8 with analogWrite.
- Board
- ESP32-C3-DevKitM-1
- Parts
- Resistor, LED
- Level
- Beginner

Pico W chaser
Six lamps sweeping on the breadboard, on the same pins as the Pico’s chaser.
- Board
- Raspberry Pi Pico W
- Parts
- Resistor, LED
- Level
- Beginner

STM32 chaser
A six-LED sweep that runs back and forth on the Black Pill, wired to PA1 through PA6.
- Board
- STM32F411 Black Pill
- Parts
- Resistor, LED
- Level
- Beginner

ESP-01 blink
An LED wired from 3V3 through a resistor to GPIO 2 lights together with the module’s own blue one, whenever the pin goes low.
- Board
- ESP-01S
- Parts
- LED, resistor
- Level
- Beginner

NodeMCU fade
An LED breathing on an ESP8266, which has no PWM hardware at all: the core moves the pin itself, and the range is 0 to 1023.
- Board
- ESP8266 NodeMCU V1.0
- Parts
- Resistor, LED
- Level
- Beginner

MicroPython motion sensor on a Pico: PIR on GP18, LED
MicroPython on a Raspberry Pi Pico: an HC-SR501 motion sensor on GP18 lights the LED on GP15 for as long as its output says something moved.
- Board
- Raspberry Pi Pico
- Parts
- PIR motion sensor, resistor, LED
- Level
- Beginner

ESP32 web server with two LEDs
The Random Nerd Tutorials ESP32 web server: press Run, open the Web panel, and its ON and OFF buttons switch the LEDs on GPIO 26 and 27.
- Board
- ESP32 DevKit V1
- Parts
- Resistor, LED
- Level
- Beginner

Uno R4 knob
A potentiometer on an Uno R4’s A0 fades an LED on pin 9, and the monitor prints the same pin in ten bits and in the converter’s own fourteen.
- Board
- Arduino Uno R4 Minima
- Parts
- Potentiometer, resistor, LED
- Level
- Beginner

Nucleo blink
The STM32 Nucleo-F411RE’s green LED on D13 and an LED beside the board, which light when the pin is HIGH, as on an Uno.
- Board
- STM32 Nucleo-F411RE
- Parts
- Resistor, LED
- Level
- Beginner

Leonardo fade
Two LEDs off two different kinds of timer: the ten-bit one on pin 13 and an ordinary 16-bit one on pin 9.
- Board
- Arduino Leonardo
- Parts
- Resistor, LED
- Level
- Beginner

Dimmer
A potentiometer on A0 sets the brightness of an LED on pin 9. Turn the knob while it runs.
- Board
- Arduino Uno R3
- Parts
- Potentiometer, resistor, LED
- Level
- Beginner

RP2040-Zero blink
An LED on GP0 of the RP2040-Zero, which has no plain LED of its own, with the board beside the breadboard.
- Board
- Waveshare RP2040-Zero
- Parts
- Resistor, LED
- Level
- Beginner

XIAO S3 knob
The XIAO knob circuit on the ESP32-S3: D0 is A0 on GPIO 1, and the count is printed as the converter gives it.
- Board
- Seeed XIAO ESP32-S3
- Parts
- Potentiometer, resistor, LED
- Level
- Beginner

SuperMini blink
The blue LED on GPIO 8 lights when the pin is low and an LED on GPIO 2 when it is high, on the smallest ESP32-C3 board.
- Board
- ESP32-C3 SuperMini
- Parts
- Resistor, LED
- Level
- Beginner

A button toggles an LED with gpiozero
gpiozero on a Raspberry Pi 4: each press of a button on GPIO2 turns the LED on GPIO17 on or off, with when_pressed and signal.pause().
- Board
- Raspberry Pi 4 Model B
- Parts
- Resistor, LED, push button
- Level
- Beginner

Blue Pill lamp
A lamp on a Blue Pill that blinks in step with the board’s own LED, because both hang off 3.3 V and PC13 sinks them.
- Board
- STM32 Blue Pill (F103)
- Parts
- Resistor, LED
- Level
- Beginner

ATmega328P at 8 MHz
An ATmega328P in a breadboard on its internal 8 MHz clock, with no crystal, running a blink built for 8 MHz.
- Board
- ATmega328P, 8 MHz internal clock
- Parts
- ATmega328P, resistor, LED
- Level
- Beginner

Night light with a light sensor
A light-dependent resistor in a divider fades a lamp up when the room goes dark. Drag the slider on the sensor.
- Board
- Arduino Uno R3
- Parts
- Photoresistor, resistor, LED
- Level
- Beginner

Nano dial
A potentiometer on the Nano's A7, the analog-only pin an Uno does not have, fades an LED on pin 9.
- Board
- Arduino Nano
- Parts
- Potentiometer, resistor, LED
- Level
- Beginner

Blink, with a breakpoint
Stop the board on the line that lights the LED, and see it frozen mid-blink with its registers.
- Board
- ESP32-C3-DevKitM-1
- Parts
- Resistor, LED
- Level
- Beginner

Dance pad on a Pro Micro
Four FSR panels on A0 to A3 with a press and a release threshold each, lighting a panel lamp and sent as four gamepad buttons through Joystick.h.
- Board
- SparkFun Pro Micro
- Parts
- Force-sensing resistor, LED, resistor
- Level
- Intermediate

HC-SR04 distance sensor with gpiozero
gpiozero DistanceSensor on a Raspberry Pi 5: an HC-SR04 with its echo divided down to 3.3 V.
- Board
- Raspberry Pi 5
- Parts
- HC-SR04 ultrasonic sensor, resistor, LED
- Level
- Intermediate

An ESP32 and an Arduino Uno talking over serial
An ESP32 reads a knob and sends the number to an Arduino Uno over a serial wire; the Uno sets an LED’s brightness from it.
- Board
- ESP32 DevKit V1 and Arduino Uno R3
- Parts
- Potentiometer, resistor, LED
- Level
- Intermediate