rajendra arkara
Published

Hello World in IoT: LED Blink with ESP32

My first IoT project—blinking 3 LEDs with ESP32 using different delays. Learning digitalWrite and delay the fun way!

BeginnerShowcase (no instructions)1 hour53
Hello World in IoT: LED Blink with ESP32

Things used in this project

Hardware components

ESP32S
Espressif ESP32S
×1
Male/Female Jumper Wires
Male/Female Jumper Wires
×4
Solderless Breadboard Full Size
Solderless Breadboard Full Size
×1
LED (generic)
LED (generic)
×3
Through Hole Resistor, 470 ohm
Through Hole Resistor, 470 ohm
×2

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

LED Wiring Setup - 3 LEDs on Breadboard

This is the wiring I used for my first IoT project. Each LED has a 470 ohm resistor and different delay.

Code

led_blink_esp32.ino

C/C++
My first IoT sketch — code for blinking 3 LEDs on ESP32 with different delays (500ms, 1000ms, 1500ms).
void setup() {
  // put your setup code here, to run once:
  pinMode(2, OUTPUT);
  pinMode(4, OUTPUT);
  pinMode(12, OUTPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
  digitalWrite(2, HIGH);
  delay(500);
  digitalWrite(2, LOW);
  delay(500);
  digitalWrite(4, HIGH);
  delay(1000);
  digitalWrite(4, LOW);
  delay(1000);
  digitalWrite(12, HIGH);
  delay(1500);
  digitalWrite(12, LOW);
  delay(1500);
}

Credits

rajendra arkara
1 project • 0 followers
CS student learning IoT and embedded systems with ESP32. Building simple projects and sharing my journey.

Comments