⚠️ CRITICAL VOLTAGE WARNING
ESP32 is a 3.3V device, NOT 5V like Arduino Uno!
- GPIO pins output 3.3V when HIGH
- GPIO pins can be permanently damaged by 5V input
- Never connect 5V sensors or modules directly to ESP32 GPIO pins
- Always check component voltage compatibility before connecting
First LED Blink - ESP32 GPIO Basics
Welcome to your first hands-on project with the ESP32! In this lesson, you'll learn how to control an LED using the ESP32's GPIO (General Purpose Input/Output) pins while understanding the critical differences between ESP32 and Arduino.
Why ESP32 is Special
| Feature | ESP32 | Arduino Uno |
|---|---|---|
| Processor Speed | 240 MHz (Dual-Core) | 16 MHz |
| Logic Voltage | 3.3V | 5V |
| WiFi | ✓ Built-in | ✗ None |
| Bluetooth | ✓ Built-in | ✗ None |
| GPIO Pins | 34 pins | 14 digital + 6 analog |
| RAM | 520 KB | 2 KB |
Understanding 3.3V Logic
The ESP32 operates at 3.3V logic level, which means:
HIGH State: GPIO outputs 3.3V
LOW State: GPIO outputs 0V (Ground)
LOW State: GPIO outputs 0V (Ground)
This is different from Arduino Uno's 5V logic. When a GPIO pin is set HIGH:
- Current flows from the GPIO pin (3.3V)
- Through the LED (which drops ~2V)
- Through the resistor (which drops ~1.3V)
- To Ground (0V)
Power Consideration: ESP32 draws 80-240mA, especially with WiFi active. Use quality USB cables and power supplies!