ESP32 C3 Super Mini - Blink multiple LED

This tutorial shows you how to program the ESP32 C3 Super Mini to blink multiple LEDs at the same time, without using the delay() function. Each LED can blink at a different frequency from the others. We use three LEDs as an example, but you can easily change the code to blink more LEDs.

In this tutorial, you'll learn:

ESP32 C3 Super Mini - Blink Multiple LED

Hardware Preparation

1×ESP32 C3 Super Mini
1×USB Cable Type-A to Type-C (for USB-A PC)
1×USB Cable Type-C to Type-C (for USB-C PC)
1×LED Kit
1×LED (red)
1×LED Module
1×Alternatively, Button and LED Kit
1×220Ω Resistor
1×Breadboard
1×Jumper Wires
1×Optionally, DC Power Jack

Or you can buy the following kits:

1×DIYables Sensor Kit (18 sensors/displays)
Disclosure: Some of the links provided in this section are Amazon affiliate links. We may receive a commission for any purchases made through these links at no additional cost to you.
Additionally, some of these links are for products from our own brand, DIYables .

Buy Note: Use the LED Module for easier wiring. It includes an integrated resistor.

Overview of LED

An LED is a small light that turns ON when current flows through it in the right direction.

Key Features:

  • Easy to control: One GPIO pin turns one LED ON or OFF.
  • Independent blinking: Each LED has its own pin, so each one can blink at its own speed.

Technical Specifications:

  • Board logic level: 3.3V on every ESP32 C3 Super Mini GPIO pin.
  • Resistor: 220 ohm for each LED.

Learn more: Our LED tutorial has detailed information and step-by-step instructions about the hardware pinout, working principle, wiring connection to ESP32 C3 Super Mini and code:

LED Pinout

Each LED has two pins.

  • Anode (long leg): Connects to a GPIO pin through the resistor.
  • Cathode (short leg): Connects to GND.

Wiring Diagram

Connect each of the three LEDs to its own GPIO pin, following the diagram below.

  • Note: This project uses three LEDs, so you need three LEDs and three 220 ohm resistors.
  • Note: Never connect an LED without its resistor. It can damage the LED and the pin.
The wiring diagram between ESP32 C3 Super Mini multiple LED

This image is created using Fritzing. Click to enlarge image

Here is the same wiring without a breadboard:

The wiring diagram between ESP32 C3 Super Mini multiple LED  (No Breadboard)

This image is created using Fritzing. Click to enlarge image

Component Pin ESP32 C3 Super Mini Pin
LED 1 Anode (through 220 ohm resistor) GPIO7
LED 2 Anode (through 220 ohm resistor) GPIO6
LED 3 Anode (through 220 ohm resistor) GPIO5
LED 1 Cathode GND
LED 2 Cathode GND
LED 3 Cathode GND

Application and Project Ideas

Blinking multiple LEDs on the ESP32 C3 Super Mini without delay() is useful in many projects.

  • Status Panel: Show different system states with different blink speeds.
  • Traffic Light Model: Run red, yellow and green LEDs for a small model.
  • Model Railway Signals: Blink warning lights at different rates.
  • Holiday Decoration: Make a string of LEDs twinkle in random-looking patterns.
  • Alarm Indicator: Use a fast blink for an alarm and a slow blink for normal.

Challenge Yourself

Try these challenges to practice blinking multiple LEDs on your ESP32 C3 Super Mini.

  • Easy: Change the ON and OFF times of each LED.
  • Medium: Add a fourth LED on GPIO3 to the array example.
  • Medium: Use a different blink pattern for each LED with other ezLED functions.
  • Advanced: Add a button that changes the blink speed of all LEDs while they keep blinking.

※ OUR MESSAGES

  • As freelancers, We are AVAILABLE for HIRE. See how to outsource your project to us
  • Please feel free to share the link of this tutorial. However, Please do not use our content on any other websites. We invested a lot of effort and time to create the content, please respect our work!