

The ESP32 38pin Narrow, manufactured by NodeMCU, is a compact and powerful microcontroller designed for Internet of Things (IoT) applications. It features integrated Wi-Fi and Bluetooth capabilities, making it an excellent choice for wireless communication projects. With 38 pins, this module offers versatile connectivity and a wide range of input/output (I/O) options, enabling developers to create complex and feature-rich systems.








The ESP32 38pin Narrow is built on the ESP32 dual-core processor, which provides high performance and low power consumption. Below are the key technical details:
| Parameter | Value |
|---|---|
| Microcontroller | ESP32-D0WDQ6 |
| Architecture | 32-bit Xtensa LX6 dual-core |
| Clock Speed | Up to 240 MHz |
| Flash Memory | 4 MB (external) |
| SRAM | 520 KB |
| Wi-Fi | 802.11 b/g/n |
| Bluetooth | v4.2 BR/EDR and BLE |
| Operating Voltage | 3.3V |
| Input Voltage (VIN) | 5V (via USB or VIN pin) |
| GPIO Pins | 30 |
| ADC Channels | 18 |
| DAC Channels | 2 |
| Communication Interfaces | UART, SPI, I2C, I2S, CAN, PWM |
| Power Consumption | Ultra-low power modes available |
The ESP32 38pin Narrow has 38 pins, each with specific functions. Below is a summary of the pin configuration:
| Pin Number | Pin Name | Function Description |
|---|---|---|
| 1 | EN | Enable pin. Active high to enable the module. |
| 2 | IO0 | GPIO0, used for boot mode selection. |
| 3 | IO1 (TX0) | GPIO1, UART0 TX (serial communication). |
| 4 | IO3 (RX0) | GPIO3, UART0 RX (serial communication). |
| 5 | IO4 | GPIO4, general-purpose I/O. |
| 6 | IO5 | GPIO5, general-purpose I/O. |
| 7 | VIN | Input voltage (5V). |
| 8 | GND | Ground. |
| ... | ... | ... (Refer to the full datasheet for details). |
Note: Some pins have multiple functions (e.g., ADC, PWM, I2C). Refer to the ESP32 datasheet for advanced configurations.
Powering the Module:
Programming the ESP32:
Connecting Peripherals:
The following code demonstrates how to blink an LED connected to GPIO2:
// Define the GPIO pin where the LED is connected
#define LED_PIN 2
void setup() {
pinMode(LED_PIN, OUTPUT); // Set the LED pin as an output
}
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 with "Failed to Connect" Error:
Wi-Fi Connection Issues:
Random Resets or Instability:
Q: Can I use the ESP32 38pin Narrow with a 5V sensor?
A: Yes, but you will need a level shifter to convert the 5V signal to 3.3V for the ESP32.
Q: How do I enable deep sleep mode?
A: Use the esp_deep_sleep_start() function in your code. Connect GPIO16 to the RESET pin for wake-up functionality.
Q: What is the maximum number of devices the ESP32 can connect to via Bluetooth?
A: The ESP32 can connect to up to 7 devices in Bluetooth Classic mode and multiple devices in BLE mode, depending on the configuration.
By following this documentation, you can effectively use the ESP32 38pin Narrow for a wide range of applications. For advanced features, refer to the official NodeMCU and Espressif documentation.