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

ESP32-Controlled Blinking LED Circuit

View and Edit Project In Cirkit DesignerImage of ESP32-Controlled Blinking LED Circuit

Circuit Documentation

Summary of the Circuit

This circuit is designed around the ESP32 microcontroller, which is a versatile and powerful chip with Wi-Fi and Bluetooth capabilities. The circuit includes a simple LED indicator and a current-limiting resistor, powered by a 5V battery. The LED is controlled by the ESP32, which toggles the LED on and off with a 2-second interval, demonstrating basic digital output functionality.

Component List

ESP32 (30 pin)

LED: Two Pin (red)

Resistor

5v Battery

Wiring Details

ESP32 (30 pin)

LED: Two Pin (red)

Resistor

5v Battery

Documented Code

// Code for controlling an LED using ESP32
int ledpin = 2; // LED connected to digital pin 2

void setup() {
    pinMode(ledpin, OUTPUT); // Initialize digital pin as an output
}

void loop() {
    digitalWrite(ledpin, HIGH); // Turn the LED on
    delay(2000);                // Wait for 2 seconds

    digitalWrite(ledpin, LOW);  // Turn the LED off
    delay(2000);                // Wait for 2 seconds
}

File Name: sketch.ino

Description: This code configures pin D2 of the ESP32 as an output to control the LED. In the loop function, it turns the LED on for 2 seconds and then off for 2 seconds, creating a blinking effect.