

The ESP32 is a powerful and versatile microcontroller designed for IoT (Internet of Things) applications and embedded systems. It features built-in Wi-Fi and Bluetooth capabilities, making it an excellent choice for projects requiring wireless communication. With its 30-pin configuration, the ESP32 provides a wide range of GPIO (General Purpose Input/Output) pins, ADC (Analog-to-Digital Converter) channels, PWM (Pulse Width Modulation) outputs, and other peripherals, enabling developers to create complex and feature-rich applications.








The ESP32 (30-pin variant) is based on the Xtensa® dual-core 32-bit LX6 microprocessor and offers a rich set of features for various applications.
| Specification | Value |
|---|---|
| Microcontroller | Xtensa® 32-bit LX6 dual-core |
| Clock Speed | Up to 240 MHz |
| Flash Memory | 4 MB (varies by module) |
| SRAM | 520 KB |
| Wi-Fi | 802.11 b/g/n |
| Bluetooth | v4.2 BR/EDR and BLE |
| Operating Voltage | 3.3V |
| Input Voltage Range | 5V (via USB) or 3.3V (via pins) |
| GPIO Pins | 30 |
| ADC Channels | 18 |
| PWM Outputs | 16 |
| Communication Interfaces | UART, SPI, I2C, I2S, CAN, etc. |
| Operating Temperature Range | -40°C to +125°C |
The ESP32 (30-pin variant) has the following pinout:
| Pin Number | Pin Name | Description |
|---|---|---|
| 1 | EN | Enable pin (active high) |
| 2 | IO1 | GPIO1, UART TX, ADC, PWM |
| 3 | IO3 | GPIO3, UART RX, ADC, PWM |
| 4 | IO4 | GPIO4, ADC, PWM |
| 5 | IO5 | GPIO5, ADC, PWM |
| 6 | GND | Ground |
| 7 | IO6 | GPIO6, SPI CLK |
| 8 | IO7 | GPIO7, SPI MISO |
| 9 | IO8 | GPIO8, SPI MOSI |
| 10 | IO9 | GPIO9, ADC, PWM |
| ... | ... | ... (Refer to the full datasheet for details) |
Note: Some pins have multiple functions. Refer to the ESP32 datasheet for detailed pin multiplexing information.
Powering the ESP32:
Connecting Peripherals:
Programming the ESP32:
Uploading Code:
The following example demonstrates how to connect the ESP32 to an Arduino UNO and send data via UART.
// Example: ESP32 and Arduino UNO UART Communication
// ESP32 TX -> Arduino RX
// ESP32 RX -> Arduino TX
// Ensure both devices share a common ground (GND).
void setup() {
Serial.begin(115200); // Initialize ESP32 serial communication
delay(1000); // Wait for serial to stabilize
Serial.println("ESP32 is ready to communicate!");
}
void loop() {
if (Serial.available()) {
// Read data from Arduino and echo it back
String data = Serial.readString();
Serial.println("Received: " + data);
}
}
Note: Adjust the baud rate and connections as needed for your specific setup.
ESP32 Not Detected by Computer:
Code Upload Fails:
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 if interfacing with 5V devices.
Q: How do I reset the ESP32?
A: Press the EN (Enable) button to reset the ESP32.
Q: Can I use the ESP32 with batteries?
A: Yes, you can power the ESP32 using a 3.7V LiPo battery with a suitable voltage regulator.
Q: How many devices can connect to the ESP32 via Bluetooth?
A: The ESP32 supports up to 7 simultaneous Bluetooth connections.
By following this documentation, you can effectively use the ESP32 (30-pin variant) in your projects and troubleshoot common issues. For more advanced features, refer to the official ESP32 datasheet and programming guide.