

The ESP32 is a powerful microcontroller developed by Espressif Systems, featuring built-in Wi-Fi and Bluetooth capabilities. With its 30-pin configuration, the ESP32 offers a wide range of GPIO (General Purpose Input/Output) pins, ADC (Analog-to-Digital Converter) channels, PWM (Pulse Width Modulation) outputs, and communication protocols such as UART, SPI, and I2C. This makes it an ideal choice for IoT (Internet of Things) applications, smart devices, and embedded systems.








| Specification | Value |
|---|---|
| Microcontroller | Tensilica Xtensa LX6 dual-core processor |
| Clock Speed | Up to 240 MHz |
| Flash Memory | 4 MB (varies by model) |
| SRAM | 520 KB |
| Wi-Fi | 802.11 b/g/n (2.4 GHz) |
| Bluetooth | v4.2 BR/EDR and BLE |
| Operating Voltage | 3.3V |
| Input Voltage Range | 5V (via USB) or 3.3V (via VIN pin) |
| GPIO Pins | 30 |
| ADC Channels | 18 (12-bit resolution) |
| PWM Outputs | Up to 16 |
| Communication Protocols | UART, SPI, I2C, CAN, I2S |
| Power Consumption | Ultra-low power (varies by mode) |
| Operating Temperature | -40°C to +85°C |
The ESP32 (30-pin variant) has the following pinout:
| Pin Number | Pin Name | Functionality |
|---|---|---|
| 1 | EN | Enable pin (active high) |
| 2 | IO1 | GPIO1, UART TX |
| 3 | IO3 | GPIO3, UART RX |
| 4 | IO4 | GPIO4, ADC, PWM |
| 5 | IO5 | GPIO5, ADC, PWM |
| 6 | GND | Ground |
| 7 | IO6 | GPIO6 (used for flash memory) |
| 8 | IO7 | GPIO7 (used for flash memory) |
| 9 | IO8 | GPIO8 (used for flash memory) |
| 10 | IO9 | GPIO9 (used for flash memory) |
| 11 | IO10 | GPIO10 (used for flash memory) |
| 12 | IO11 | GPIO11 (used for flash memory) |
| 13 | IO12 | GPIO12, ADC, PWM |
| 14 | IO13 | GPIO13, ADC, PWM |
| 15 | IO14 | GPIO14, ADC, PWM |
| 16 | IO15 | GPIO15, ADC, PWM |
| 17 | IO16 | GPIO16, ADC, PWM |
| 18 | IO17 | GPIO17, ADC, PWM |
| 19 | IO18 | GPIO18, SPI CLK |
| 20 | IO19 | GPIO19, SPI MISO |
| 21 | IO21 | GPIO21, I2C SDA |
| 22 | IO22 | GPIO22, I2C SCL |
| 23 | IO23 | GPIO23, SPI MOSI |
| 24 | VIN | Power input (3.3V) |
| 25 | 3V3 | 3.3V output |
| 26 | GND | Ground |
| 27 | IO25 | GPIO25, ADC, PWM |
| 28 | IO26 | GPIO26, ADC, PWM |
| 29 | IO27 | GPIO27, ADC, PWM |
| 30 | IO32 | GPIO32, ADC, PWM |
Powering the ESP32:
Connecting GPIO Pins:
Programming the ESP32:
Uploading Code:
The following example demonstrates how to blink an LED connected to GPIO2:
// Define the GPIO pin for the LED
#define LED_PIN 2
void setup() {
// Set the LED pin as an output
pinMode(LED_PIN, OUTPUT);
}
void loop() {
// Turn the LED on
digitalWrite(LED_PIN, HIGH);
delay(1000); // Wait for 1 second
// Turn the LED off
digitalWrite(LED_PIN, LOW);
delay(1000); // Wait for 1 second
}
ESP32 Not Detected by Computer:
Code Upload Fails:
Wi-Fi Connection Issues:
Overheating:
Q: Can the ESP32 operate on battery power?
A: Yes, the ESP32 can be powered by a LiPo battery connected to the VIN pin. Use a voltage regulator if necessary.
Q: How do I reset the ESP32?
A: Press the "EN" button on the board to reset the ESP32.
Q: Can I use the ESP32 with 5V sensors?
A: Yes, but you must use a level shifter to convert 5V signals to 3.3V.
Q: What is the maximum current output of the GPIO pins?
A: Each GPIO pin can source or sink up to 12 mA safely.