Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

ESP32-Controlled LED Light Show with Sequential Patterns

View and Edit Project In Cirkit DesignerImage of ESP32-Controlled LED Light Show with Sequential Patterns

Circuit Documentation

Summary

This circuit consists of an ESP32 microcontroller controlling ten red LEDs through GPIO pins. Each LED is connected in series with a 220 Ohm resistor to limit the current. The microcontroller is programmed to light up the LEDs in a specific pattern.

Component List

ESP32 (30 pin)

LED: Two Pin (red)

Resistor

Wiring Details

ESP32 (30 pin)

LED: Two Pin (red)

Resistor

Code Documentation

int L1 = 14;
int L2 = 25;
int L3 = 33;
int L4 = 32;
int L5 = 26;
int L6 = 4;
int L7 = 5;
int L8 = 18;
int L9 = 19;
int L10 = 21;

void setup() {
  pinMode(L1, OUTPUT);
  pinMode(L2, OUTPUT);
  pinMode(L3, OUTPUT);
  pinMode(L4, OUTPUT);
  pinMode(L5, OUTPUT);
  pinMode(L6, OUTPUT);
  pinMode(L7, OUTPUT);
  pinMode(L8, OUTPUT);
  pinMode(L9, OUTPUT);
  pinMode(L10, OUTPUT);
}

void loop(){
  //pattern 1
  digitalWrite(L1, HIGH);
  delay(200);
  digitalWrite(L2, HIGH);
  delay(200);
  digitalWrite(L3, HIGH);
  delay(200);
  digitalWrite(L4, HIGH);
  delay(200);
  digitalWrite(L5, HIGH);
  delay(200);
  digitalWrite(L6, HIGH);
  delay(200);
  digitalWrite(L7, HIGH);
  delay(200);
  digitalWrite(L8, HIGH);
  delay(200);
  digitalWrite(L9, HIGH);
  delay(200);
  digitalWrite(L10, HIGH);
  delay(1000);

  // pattern 2
  digitalWrite(L1, LOW);
  delay(200);
  digitalWrite(L2, LOW);
  delay(200);
  digitalWrite(L3, LOW);
  delay(200);
  digitalWrite(L4, LOW);
  delay(200);
  digitalWrite(L5, LOW);
  delay(200);
  digitalWrite(L6, LOW);
  delay(200);
  digitalWrite(L7, LOW);
  delay(200);
  digitalWrite(L8, LOW);
  delay(200);
  digitalWrite(L9, LOW);
  delay(200);
  digitalWrite(L10, LOW);
  delay(1000);
}

This code sets up the GPIO pins connected to the LEDs as outputs and then runs a loop that lights up the LEDs in a sequence with a delay between each LED turning on and off.