Tech Circuit Guide

Practical engineering documentation, wiring standards, and verified code implementations.

How to Connect and Blink an External LED with ESP32

Wiring an external LED to an ESP32 board using a 330Ω current-limiting resistor on GPIO 23.

Component Pin ESP32 Connection
LED Cathode (Short leg / Flat side) ESP32 GND
LED Anode (Long leg) 330Ω Resistor → ESP32 GPIO 23

Arduino IDE / C++ Verification Sketch

const int ledPin = 23;

void setup() {
  pinMode(ledPin, OUTPUT);
}

void loop() {
  digitalWrite(ledPin, HIGH);
  delay(1000);
  digitalWrite(ledPin, LOW);
  delay(1000);
}