

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. With its dual-core processor, extensive GPIO options, and support for various communication protocols, the ESP32 is a versatile and powerful microcontroller for a wide range of projects.








The ESP32 is packed with features that make it suitable for both simple and complex applications. Below are its key technical specifications:
| Specification | Value |
|---|---|
| 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 |
| Bluetooth | Bluetooth 4.2 and BLE |
| Operating Voltage | 3.3V |
| GPIO Pins | 34 |
| 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 modes available |
The ESP32 has a variety of pins for different functionalities. Below is a table summarizing the most commonly used pins:
| Pin Name | Functionality | Description |
|---|---|---|
| GPIO0 | Input/Output, Boot Mode Selection | Used for boot mode selection during startup. |
| GPIO2 | Input/Output, ADC, PWM, Touch | General-purpose pin with multiple functions. |
| GPIO12 | Input/Output, ADC, PWM, Touch | General-purpose pin with ADC and touch input. |
| GPIO13 | Input/Output, ADC, PWM, Touch | General-purpose pin with ADC and touch input. |
| GPIO15 | Input/Output, ADC, PWM, Touch | General-purpose pin with ADC and touch input. |
| GPIO16 | Input/Output | General-purpose pin. |
| GPIO17 | Input/Output | General-purpose pin. |
| EN | Enable | Resets the chip when pulled low. |
| 3V3 | Power | Provides 3.3V output. |
| GND | Ground | Ground connection. |
Note: The exact pin configuration may vary depending on the ESP32 module or development board you are using (e.g., ESP32-WROOM-32, ESP32-WROVER).
Below is an example of how to use the ESP32 to connect to a Wi-Fi network and blink an LED:
#include <WiFi.h> // Include the Wi-Fi library
// Replace with your network credentials
const char* ssid = "Your_SSID";
const char* password = "Your_PASSWORD";
const int ledPin = 2; // GPIO2 is often used for onboard LEDs
void setup() {
pinMode(ledPin, OUTPUT); // Set GPIO2 as an output pin
Serial.begin(115200); // Initialize serial communication
// Connect to Wi-Fi
Serial.print("Connecting to Wi-Fi");
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("\nWi-Fi connected!");
}
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
}
Tip: Replace
Your_SSIDandYour_PASSWORDwith your Wi-Fi network's credentials.
ESP32 Not Connecting to Wi-Fi
Upload Fails in Arduino IDE
Tools > Board and the correct COM port is selected.ESP32 Keeps Resetting
GPIO Pin Not Working
Q: Can the ESP32 be powered with 5V?
A: Yes, if you are using a development board with a built-in voltage regulator. The ESP32 chip itself requires 3.3V.
Q: How do I reset the ESP32?
A: Press the "EN" button on the development board or pull the EN pin low.
Q: Can the ESP32 handle multiple tasks simultaneously?
A: Yes, the ESP32 supports FreeRTOS, allowing you to run multiple tasks concurrently.
Q: Is the ESP32 compatible with Arduino libraries?
A: Yes, many Arduino libraries are compatible with the ESP32, but some may require modifications.
This documentation provides a comprehensive overview of the ESP32, helping you get started with your projects and troubleshoot common issues effectively.