Circuits / Microcontrollers
ESP32 blinking an LED
A GPIO pin as an output: digitalWrite(13, HIGH) lights D1, delay() sets the rhythm

Tap a part to see its voltages and currents. It is a model, not a measurement.
What do you need?
- Development board ESP32 DevKitSearch on Amazon
- Resistor 220 ΩSearch on Amazon
- Red LEDSearch on Amazon
- Jumper wires × 2Search on Amazon
- BreadboardSearch on Amazon
How does an ESP32 blink an LED?
A GPIO pin set as an output with pinMode(13, OUTPUT) can be switched between 0 V and 3.3 V by the program. digitalWrite(13, HIGH) puts 3.3 V on pin D13, and current flows through R1 (220 Ω) and the LED back to GND, about 6.7 mA: 1.5 V across the resistor and 1.7 V across the LED. digitalWrite(13, LOW) brings the pin back to 0 V and the LED goes off. The two delay(500) calls hold each state for half a second, so the LED blinks once per second. The resistor matters even more here than on 5 V: an ESP32 pin should stay well below its 40 mA absolute maximum, and without R1 nothing would limit the current. Change delay() to blink faster or slower; change R1 to make it brighter or dimmer.
Values from the Protoboard ISO simulation: a model, not a bench measurement.
Hear about the next circuit
One email when a new circuit is out, about twice a month. Nothing else.