

The ESP32 is a low-cost, low-power system on a chip (SoC) developed by Espressif Systems. It features integrated Wi-Fi and Bluetooth capabilities, making it an ideal choice for Internet of Things (IoT) applications, smart devices, and embedded systems. The ESP32 is highly versatile, offering dual-core processing, a wide range of GPIO pins, and support for various communication protocols.








| Feature | Specification |
|---|---|
| Processor | Dual-core Xtensa® 32-bit LX6 microprocessor |
| Clock Speed | Up to 240 MHz |
| Flash Memory | 4 MB (varies by module) |
| SRAM | 520 KB |
| Wi-Fi | 802.11 b/g/n (2.4 GHz) |
| Bluetooth | Bluetooth 4.2 and BLE |
| Operating Voltage | 3.0V - 3.6V |
| GPIO Pins | Up to 34 (multiplexed with other functions) |
| ADC Channels | 18 (12-bit resolution) |
| DAC Channels | 2 (8-bit resolution) |
| Communication Interfaces | UART, SPI, I2C, I2S, CAN, PWM |
| Power Consumption | Ultra-low power (varies by mode) |
| Operating Temperature | -40°C to 125°C |
The ESP32 has multiple variants (e.g., ESP32-WROOM-32, ESP32-WROVER), but the pinout for the ESP32-WROOM-32 module is commonly used. Below is a summary of the key pins:
| Pin Name | Functionality | Description |
|---|---|---|
| GPIO0 | Input/Output, Boot Mode Selection | Used for boot mode selection during startup. |
| GPIO2 | Input/Output, ADC, PWM | General-purpose pin with ADC and PWM support. |
| GPIO4 | Input/Output, ADC, PWM | General-purpose pin with ADC and PWM support. |
| GPIO5 | Input/Output, ADC, PWM, SPI | General-purpose pin with SPI support. |
| GPIO12 | Input/Output, ADC, PWM, Touch Sensor | Supports touch sensing and ADC functionality. |
| GPIO13 | Input/Output, ADC, PWM, Touch Sensor | Supports touch sensing and ADC functionality. |
| GPIO14 | Input/Output, ADC, PWM, SPI | General-purpose pin with SPI support. |
| GPIO15 | Input/Output, ADC, PWM, Touch Sensor | Supports touch sensing and ADC functionality. |
| GPIO16 | Input/Output | General-purpose pin. |
| GPIO17 | Input/Output | General-purpose pin. |
| EN | Enable | Resets the chip when pulled low. |
| 3V3 | Power Supply | Provides 3.3V power to the module. |
| GND | Ground | Ground connection. |
Note: Some GPIO pins have specific restrictions or are used during boot. Refer to the ESP32 datasheet for detailed pin behavior.
3V3 pin. Avoid exceeding 3.6V to prevent damage.Below is an example of how to connect the ESP32 to a Wi-Fi network and blink an LED:
#include <WiFi.h> // Include the Wi-Fi library
const char* ssid = "Your_SSID"; // Replace with your Wi-Fi SSID
const char* password = "Your_PASSWORD"; // Replace with your Wi-Fi password
const int ledPin = 2; // GPIO2 is often used for onboard LEDs
void setup() {
pinMode(ledPin, OUTPUT); // Set GPIO2 as an output
Serial.begin(115200); // Initialize serial communication
Serial.println("Connecting to Wi-Fi...");
WiFi.begin(ssid, password); // Start Wi-Fi connection
while (WiFi.status() != WL_CONNECTED) {
delay(500); // Wait for connection
Serial.print(".");
}
Serial.println("\nWi-Fi connected!");
Serial.print("IP Address: ");
Serial.println(WiFi.localIP()); // Print the device's IP address
}
void loop() {
digitalWrite(ledPin, HIGH); // Turn the LED on
delay(1000); // Wait for 1 second
digitalWrite(ledPin, LOW); // Turn the LED off
delay(1000); // Wait for 1 second
}
Note: Replace
Your_SSIDandYour_PASSWORDwith your Wi-Fi credentials.
ESP32 Not Connecting to Wi-Fi
GPIO Pins Not Working as Expected
Device Not Detected by Computer
Frequent Resets or Instability
Q: Can the ESP32 operate on battery power?
Q: How do I update the ESP32 firmware?
Q: Can I use the ESP32 with 5V logic devices?