

The ESP32 is a powerful microcontroller developed by Espressif Systems, featuring integrated Wi-Fi and Bluetooth capabilities. With its 30-pin configuration, the ESP32 is designed to support a wide range of input/output functions, making it an excellent choice for Internet of Things (IoT) applications, smart devices, and embedded systems. Its high processing power, low energy consumption, and versatile connectivity options make it a popular choice among hobbyists and professionals alike.








The ESP32 (30-pin variant) is equipped with robust hardware and versatile features. Below are its key technical specifications:
The ESP32 (30-pin variant) has a standard pinout. Below is a table describing the pin configuration:
| Pin Number | Pin Name | Function |
|---|---|---|
| 1 | EN | Enable pin (active high) |
| 2 | IO1 | GPIO1, UART TX |
| 3 | IO3 | GPIO3, UART RX |
| 4 | IO4 | GPIO4, PWM, ADC |
| 5 | IO5 | GPIO5, PWM, ADC |
| 6 | GND | Ground |
| 7 | IO12 | GPIO12, ADC, Touch Sensor |
| 8 | IO13 | GPIO13, ADC, Touch Sensor |
| 9 | IO14 | GPIO14, PWM, ADC |
| 10 | IO15 | GPIO15, PWM, ADC |
| 11 | IO16 | GPIO16, UART RX2 |
| 12 | IO17 | GPIO17, UART TX2 |
| 13 | IO18 | GPIO18, SPI CLK |
| 14 | IO19 | GPIO19, SPI MISO |
| 15 | IO21 | GPIO21, I2C SDA |
| 16 | IO22 | GPIO22, I2C SCL |
| 17 | IO23 | GPIO23, SPI MOSI |
| 18 | VIN | Input voltage (3.3V or 5V) |
| 19 | 3V3 | 3.3V output |
| 20 | GND | Ground |
| 21 | IO25 | GPIO25, DAC1 |
| 22 | IO26 | GPIO26, DAC2 |
| 23 | IO27 | GPIO27, ADC, Touch Sensor |
| 24 | IO32 | GPIO32, ADC, Touch Sensor |
| 25 | IO33 | GPIO33, ADC, Touch Sensor |
| 26 | IO34 | GPIO34, ADC (input only) |
| 27 | IO35 | GPIO35, ADC (input only) |
| 28 | IO36 | GPIO36, ADC (input only) |
| 29 | IO39 | GPIO39, ADC (input only) |
| 30 | GND | Ground |
Powering the ESP32:
Connecting Peripherals:
Programming the ESP32:
Below is an example of how to blink an LED connected to GPIO2 of the ESP32:
// Example: Blink an LED connected to GPIO2 of the ESP32
// Define the GPIO pin for the LED
#define LED_PIN 2
void setup() {
pinMode(LED_PIN, OUTPUT); // Set GPIO2 as an output pin
}
void loop() {
digitalWrite(LED_PIN, HIGH); // Turn the LED on
delay(1000); // Wait for 1 second
digitalWrite(LED_PIN, LOW); // Turn the LED off
delay(1000); // Wait for 1 second
}
ESP32 Not Detected by Computer:
Upload Fails in Arduino IDE:
Wi-Fi Connection Issues:
Random Resets or Instability:
Q: Can the ESP32 operate on 5V logic?
A: No, the ESP32 operates on 3.3V logic. Use level shifters for 5V devices.
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 a battery?
A: Yes, you can power the ESP32 using a 3.7V LiPo battery connected to the VIN pin.
This concludes the documentation for the ESP32 (30-pin variant).