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

ESP32-Based Smart RGB LED and Servo Control with RFID and OLED Display

View and Edit Project In Cirkit DesignerImage of ESP32-Based Smart RGB LED and Servo Control with RFID and OLED Display

Circuit Documentation

Summary

This document provides a detailed overview of a circuit that includes an ESP32 microcontroller, an RGB LED module, a micro servo, an RFID-RC522 module, an OLED display, and a buzzer module. The ESP32 microcontroller is the central unit that controls the other components. The circuit is designed to demonstrate basic control of an RGB LED, a servo motor, an RFID reader, an OLED display, and a buzzer.

Component List

ESP32 (30 pin)

RGB LED Module

Micro Servo 9G

RFID-RC522

OLED 1.3"

Buzzer Module

Wiring Details

ESP32 (30 pin)

RGB LED Module

Micro Servo 9G

RFID-RC522

OLED 1.3"

Buzzer Module

Code Documentation

ESP32 Code

#define RED_PIN 25
#define GREEN_PIN 26
#define BLUE_PIN 27

void setup() {
  pinMode(RED_PIN, OUTPUT);
  pinMode(GREEN_PIN, OUTPUT);
  pinMode(BLUE_PIN, OUTPUT);
}

void loop() {
  // Turn on Red
  digitalWrite(RED_PIN, HIGH);
  digitalWrite(GREEN_PIN, LOW);
  digitalWrite(BLUE_PIN, LOW);
  delay(1000);

  // Turn on Green
  digitalWrite(RED_PIN, LOW);
  digitalWrite(GREEN_PIN, HIGH);
  digitalWrite(BLUE_PIN, LOW);
  delay(1000);

  // Turn on Blue
  digitalWrite(RED_PIN, LOW);
  digitalWrite(GREEN_PIN, LOW);
  digitalWrite(BLUE_PIN, HIGH);
  delay(1000);
}

This code sets up the ESP32 to control the RGB LED module. It defines the pins connected to the red, green, and blue LEDs and sets them as output pins. The loop function cycles through turning on each color for one second.