Skip to content
E

Wi-Fi

Interfacing ESP 01 Wi-Fi with ESP32

What is the ESP 01?

A bare-bones ESP8266 Wi-Fi module controllable via AT commands, a cheap way to bolt Wi-Fi connectivity onto non-networked microcontrollers. The ESP-01 exposes just enough pins — power, UART, and two GPIO — to run the module in its simplest mode: forward AT commands over serial from an existing microcontroller like an Arduino Uno, and let the ESP-01 handle all the Wi-Fi networking, making it a low-cost bridge for otherwise offline projects that just need occasional connectivity (sending sensor data to the cloud, receiving simple remote commands).

Specifications

Wi-Fi chipsetESP8266 SoC, 802.11 b/g/n 2.4GHz Wi-Fi
Operating voltage3.3V DC only (NOT 5V tolerant on any pin)
Operating current~80 mA average, spikes to 200-300 mA during Wi-Fi transmit bursts
Flash memoryTypically 1MB onboard SPI flash on standard ESP-01 boards (ESP-01S variants may have more)
GPIOOnly 2 usable GPIO pins broken out (GPIO0, GPIO2) — the most limiting factor of this module
Programming interfaceUART (TX/RX), controlled via AT command firmware by default, or reflashed with custom Arduino-core firmware
Form factorVery small 8-pin module, the smallest and cheapest of the common ESP8266 breakout family

ESP 01 Pinout

PinNameDescription
1VCCPower, 3.3V DC only — do not supply 5V
2GNDGround
3TXUART transmit — connect to microcontroller RX
4RXUART receive — connect to microcontroller TX (3.3V logic, level-shift from 5V boards)
5GPIO0General I/O; must be pulled LOW at boot to enter flashing mode, HIGH for normal AT-command run mode
6GPIO2General I/O; must be pulled HIGH at boot for normal operation
7CH_PD / ENChip enable — must be pulled HIGH for the module to run
8RSTActive-LOW reset pin

All ESP-01 pins are strictly 3.3V — connecting directly to a 5V Arduino's logic pins without a level shifter or resistor divider will damage the chip. The module also draws current spikes during Wi-Fi transmission that a microcontroller's onboard 3.3V regulator often can't supply reliably, so a separate 3.3V regulator capable of a few hundred mA is strongly recommended rather than powering it from an Arduino's 3.3V pin.

Setting Up ESP 01 with ESP32

Library

ESP8266WiFi by ESP8266 Community

Bundled with the ESP8266 Arduino core

Library guide

Wiring

Component pinESP32 pinNote
VCC3.3VESP-01 needs a stable 3.3V supply capable of ~300mA peaks during Wi-Fi TX -- use a dedicated regulator if you see resets
GNDGND
TXGPIO16 (RX2)ESP-01 TX is 3.3V logic -- safe to connect directly
RXGPIO17 (TX2)
CH_PD / EN3.3VMust be pulled HIGH for the module to run
GPIO23.3VMust be pulled HIGH at boot for normal operation
GPIO0Floating or pulled HIGHPull LOW only when re-flashing firmware; HIGH for normal AT-command operation

Example code

C++

This bridges the ESP32's UART2 to the ESP-01 running its stock AT-command firmware. Since the ESP32 already has its own Wi-Fi radio, pairing it with an ESP-01 is mainly useful for learning AT commands -- for new projects, using the ESP32's built-in WiFi library directly is simpler.

Related Guides & Projects