

The ESP32 is a powerful microcontroller with integrated Wi-Fi and Bluetooth capabilities, making it an ideal choice for Internet of Things (IoT) applications. It features a dual-core processor, low-power operation, and a wide range of peripherals. When paired with an expansion board, the ESP32 becomes even more versatile, offering additional GPIO pins, power management features, and improved connectivity options. This combination simplifies prototyping and development for both beginners and experienced users.








| Specification | Value |
|---|---|
| Microcontroller | ESP32 Dual-Core Tensilica Xtensa LX6 |
| Clock Speed | Up to 240 MHz |
| Flash Memory | 4 MB (varies by model) |
| SRAM | 520 KB |
| Wi-Fi Standard | 802.11 b/g/n |
| Bluetooth | v4.2 BR/EDR and BLE |
| Operating Voltage | 3.3V |
| Input Voltage (via USB) | 5V |
| GPIO Pins | Up to 30 (varies with expansion board) |
| ADC Channels | Up to 18 |
| DAC Channels | 2 |
| Communication Interfaces | UART, SPI, I2C, I2S, CAN, PWM |
| Power Modes | Active, Sleep, Deep Sleep |
The pin configuration of the ESP32 with an expansion board may vary slightly depending on the specific board model. Below is a general pinout description:
| Pin Name | Description |
|---|---|
| VIN | Input voltage (5V from USB or external source) |
| 3V3 | 3.3V output for powering external components |
| GND | Ground |
| GPIO0-GPIO39 | General-purpose input/output pins |
| ADC1/ADC2 | Analog-to-digital converter channels |
| DAC1/DAC2 | Digital-to-analog converter channels |
| TX/RX | UART communication pins |
| SCL/SDA | I2C clock and data pins |
| MOSI/MISO/SCK | SPI communication pins |
| EN | Enable pin to reset the ESP32 |
| BOOT | Boot mode selection pin |
Powering the Board:
Programming the ESP32:
Connecting Peripherals:
Uploading Code:
The following example demonstrates how to blink an LED connected to GPIO2 of the ESP32.
// Define the GPIO pin where the LED is connected
const int ledPin = 2;
void setup() {
// Set the LED pin as an output
pinMode(ledPin, OUTPUT);
}
void loop() {
// Turn the LED on
digitalWrite(ledPin, HIGH);
delay(1000); // Wait for 1 second
// Turn the LED off
digitalWrite(ledPin, LOW);
delay(1000); // Wait for 1 second
}
ESP32 Not Detected by Computer:
Code Upload Fails:
Wi-Fi Connection Issues:
Random Resets or Instability:
Q: Can I use the ESP32 with a 5V sensor?
A: Yes, but you will need a level shifter to convert the 5V signal to 3.3V for the ESP32 GPIO pins.
Q: How do I put the ESP32 into deep sleep mode?
A: Use the esp_deep_sleep_start() function in your code. Refer to the ESP32 documentation for configuring wake-up sources.
Q: Can I use the ESP32 with an external antenna?
A: Some ESP32 modules support external antennas. Check if your module has an IPEX connector and configure the antenna selection accordingly.
Q: What is the maximum range of the ESP32's Wi-Fi?
A: The range depends on environmental factors but typically extends up to 100 meters in open spaces.
By following this documentation, you can effectively utilize the ESP32 with an expansion board for a wide range of applications.