The ESP32 is a low-cost, low-power system on a chip (SoC) with integrated Wi-Fi and dual-mode Bluetooth. It features 30 GPIO pins, making it highly versatile for connectivity and control in various IoT applications. The ESP32 is widely used in smart home devices, wearables, industrial automation, and other embedded systems due to its robust performance and extensive feature set.
Parameter | Value |
---|---|
Operating Voltage | 3.3V |
Input Voltage | 5V (via USB) |
Digital I/O Pins | 30 |
Analog Input Pins | 16 (12-bit ADC) |
Flash Memory | 4MB (varies by model) |
SRAM | 520KB |
Wi-Fi Standards | 802.11 b/g/n |
Bluetooth | v4.2 BR/EDR and BLE |
CPU | Dual-core 32-bit LX6 microprocessor |
Clock Speed | Up to 240 MHz |
Operating Temperature | -40°C to 125°C |
Pin Number | Pin Name | Description |
---|---|---|
1 | EN | Enable (Active High) |
2 | IO23 | GPIO23, ADC2_CH0, HSPI MOSI |
3 | IO22 | GPIO22, ADC2_CH1, HSPI CLK |
4 | IO1 | GPIO1, UART0 TX |
5 | IO3 | GPIO3, UART0 RX |
6 | IO21 | GPIO21, I2C SDA |
7 | GND | Ground |
8 | IO19 | GPIO19, ADC2_CH3, VSPI MISO |
9 | IO18 | GPIO18, ADC2_CH4, VSPI CLK |
10 | IO5 | GPIO5, ADC2_CH5, VSPI CS0 |
11 | IO17 | GPIO17, UART2 TX |
12 | IO16 | GPIO16, UART2 RX |
13 | IO4 | GPIO4, ADC2_CH0, HSPI CS0 |
14 | IO0 | GPIO0, ADC2_CH1, Boot Button |
15 | IO2 | GPIO2, ADC2_CH2, HSPI WP |
16 | IO15 | GPIO15, ADC2_CH3, HSPI CS1 |
17 | IO13 | GPIO13, ADC2_CH4, HSPI ID |
18 | IO12 | GPIO12, ADC2_CH5, HSPI Q |
19 | IO14 | GPIO14, ADC2_CH6, HSPI CLK |
20 | IO27 | GPIO27, ADC2_CH7, HSPI D |
21 | IO26 | GPIO26, ADC2_CH8, HSPI D |
22 | IO25 | GPIO25, ADC2_CH9, HSPI D |
23 | IO33 | GPIO33, ADC1_CH5, DAC1 |
24 | IO32 | GPIO32, ADC1_CH4, DAC1 |
25 | IO35 | GPIO35, ADC1_CH7 |
26 | IO34 | GPIO34, ADC1_CH6 |
27 | IO39 | GPIO39, ADC1_CH3 |
28 | IO36 | GPIO36, ADC1_CH0 |
29 | IO37 | GPIO37, ADC1_CH1 |
30 | IO38 | GPIO38, ADC1_CH2 |
Powering the ESP32:
Programming the ESP32:
Connecting Peripherals:
ESP32 Not Powering On:
Wi-Fi Connection Issues:
Serial Communication Problems:
Resetting the ESP32:
Debugging Code:
Firmware Updates:
#include <WiFi.h>
// Replace with your network credentials
const char* ssid = "your_SSID";
const char* password = "your_PASSWORD";
void setup() {
Serial.begin(115200); // Initialize serial communication at 115200 baud
delay(10);
// Connect to Wi-Fi network
Serial.println();
Serial.print("Connecting to ");
Serial.println(ssid);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.println("WiFi connected.");
Serial.println("IP address: ");
Serial.println(WiFi.localIP()); // Print the IP address
}
void loop() {
// Your main code here
}
This example demonstrates how to connect the ESP32 to a Wi-Fi network using the Arduino IDE. Replace your_SSID
and your_PASSWORD
with your network credentials.
By following this documentation, users can effectively utilize the ESP32 in their projects, troubleshoot common issues, and implement best practices for reliable operation.