The ESP32 DevKitC V4 is a compact and versatile development board designed by Espressif. It features the ESP32-WROOM-32U module, which integrates a powerful dual-core processor, Wi-Fi, and Bluetooth capabilities. This board is ideal for Internet of Things (IoT) applications, smart devices, and rapid prototyping. Its small form factor and rich set of GPIO pins make it suitable for a wide range of projects, from home automation to industrial control systems.
Parameter | Value |
---|---|
Microcontroller | ESP32 (dual-core Xtensa LX6 processor) |
Clock Speed | Up to 240 MHz |
Flash Memory | 4 MB (integrated in ESP32-WROOM-32U) |
RAM | 520 KB SRAM |
Wireless Connectivity | Wi-Fi 802.11 b/g/n, Bluetooth v4.2 BR/EDR |
Operating Voltage | 3.3V |
Input Voltage (via USB) | 5V |
GPIO Pins | 30 (multipurpose, including ADC, PWM, etc.) |
Communication Interfaces | UART, SPI, I2C, I2S, CAN, PWM |
Dimensions | 54 mm x 27 mm |
The ESP32 DevKitC V4 has a total of 30 GPIO pins, which are multiplexed for various functions. Below is the pinout description:
Pin Number | Pin Name | Functionality |
---|---|---|
1 | EN | Reset the chip (active high) |
2 | IO0 | GPIO0, used for boot mode selection |
3 | IO1 | GPIO1, UART TXD0 |
4 | IO2 | GPIO2, ADC, PWM, Touch Sensor |
5 | IO3 | GPIO3, UART RXD0 |
6 | IO4 | GPIO4, ADC, PWM, Touch Sensor |
7 | IO5 | GPIO5, ADC, PWM, Touch Sensor |
8 | IO12 | GPIO12, ADC, PWM, Touch Sensor |
9 | IO13 | GPIO13, ADC, PWM, Touch Sensor |
10 | IO14 | GPIO14, ADC, PWM, Touch Sensor |
11 | IO15 | GPIO15, ADC, PWM, Touch Sensor |
12 | IO16 | GPIO16, UART RXD2 |
13 | IO17 | GPIO17, UART TXD2 |
14 | IO18 | GPIO18, SPI CLK |
15 | IO19 | GPIO19, SPI MISO |
16 | IO21 | GPIO21, I2C SDA |
17 | IO22 | GPIO22, I2C SCL |
18 | IO23 | GPIO23, SPI MOSI |
19 | IO25 | GPIO25, ADC, DAC |
20 | IO26 | GPIO26, ADC, DAC |
21 | IO27 | GPIO27, ADC, PWM |
22 | IO32 | GPIO32, ADC, Touch Sensor |
23 | IO33 | GPIO33, ADC, Touch Sensor |
24 | IO34 | GPIO34, ADC (input only) |
25 | IO35 | GPIO35, ADC (input only) |
26 | IO36 | GPIO36, ADC (input only) |
27 | IO39 | GPIO39, ADC (input only) |
Powering the Board:
Programming the Board:
Connecting Peripherals:
Uploading Code:
Below is an example of how to blink an LED connected to GPIO2:
// Define the GPIO pin for the LED
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
}
The board is not detected by the computer:
Code upload fails:
Wi-Fi connection issues:
GPIO pin not working as expected:
Q: Can I power the ESP32 DevKitC V4 with a battery?
A: Yes, you can use a 3.7V LiPo battery with a voltage regulator to supply 3.3V to the 3V3 pin.
Q: What is the maximum current output of the GPIO pins?
A: Each GPIO pin can source or sink up to 12 mA safely.
Q: Can I use the ESP32 DevKitC V4 with MicroPython?
A: Yes, the ESP32 supports MicroPython. You can flash the MicroPython firmware to the board and use it for development.
Q: How do I reset the board?
A: Press the EN button to reset the board.