Wi-Fi
Interfacing ESP8266 Module Wi-Fi with Raspberry Pi
What is the ESP8266 Module?
ESP8266 Module practical reference
A more fully-broken-out ESP8266 module than the ESP-01, exposing extra GPIO pins alongside its Wi-Fi radio. It packages the same ESP8266 Wi-Fi SoC used across the ESP-01 through ESP-12 family, but on a board layout that surfaces more of the chip's usable GPIO, ADC, and control pins, making it easier to wire directly into a breadboard project without the limited 2-GPIO constraint of the ESP-01.
Key specifications
- Wi-Fi chipset: ESP8266 SoC, 802.11 b/g/n 2.4GHz Wi-Fi
- CPU: Tensilica L106 32-bit RISC, up to 80/160 MHz
- Operating voltage: 3.3V DC (NOT 5V tolerant on GPIO or power input)
- Operating current: ~80 mA average, spikes to 200-300 mA during Wi-Fi transmit bursts
- Flash memory: Typically 1MB–4MB onboard SPI flash, depending on module variant
- GPIO: Multiple usable GPIO pins broken out (varies by exact module, typically 8-9), plus one analog input (ADC)
- ADC: 1 analog input, 0-1V range (some breakouts add a resistor divider for 0-3.3V)
- Programming interface: UART (TX/RX) for flashing via esptool or the Arduino IDE, requires GPIO0 pulled LOW to enter flash mode
Pinout and connection notes
All ESP8266 GPIO and power pins are strictly 3.3V — connecting 5V logic or supply will damage the chip, so use a logic-level shifter or a 5V-to-3.3V regulator when interfacing with 5V boards like the Arduino Uno. GPIO0 and GPIO2 have boot-mode roles (LOW/HIGH respectively for normal run) that must be respected or the module will fail to start correctly.
- VCC: Power, 3.3V DC only — do not supply 5V
- GND: Ground
- TX / RXD: UART transmit/receive for programming and serial communication
- GPIO0: General I/O; must be pulled LOW at boot to enter flashing mode, HIGH for normal run mode
- GPIO2: General I/O; must be pulled HIGH at boot for normal operation
- CH_PD / EN: Chip enable — must be pulled HIGH for the module to run
- RST: Active-LOW reset pin
- A0 (ADC): Analog input, present on modules that expose it (e.g. ESP-12 based boards)
Integration checklist
- Confirm the exact part number and breakout-board revision.
- Verify supply voltage, current demand, logic levels, and signal direction against the datasheet.
- Check controller pin assignments and bus address or interface mode against the example code.
- Power up with external loads disconnected, then test signals before full integration.
- If readings or communication fail, check power and ground first, then pin mapping, interface settings, and library initialization.
Troubleshooting and reproducibility
Record the board used, wiring, library/version, supply arrangement, and measured behavior. Use the selected board-specific wiring example as the source of truth. Never assume visually similar modules share identical voltage tolerance or pin order.
Setting Up ESP8266 Module with Raspberry Pi
Library
pyserial
pip3 install pyserial — then enable the hardware serial port (not the serial console) via raspi-config
Wiring
| Component pin | Raspberry Pi pin | Note |
|---|---|---|
| VCC | 3.3V (physical pin 1) | |
| GND | GND | |
| TX | GPIO15 / RXD (physical pin 10) | Pi RX is already 3.3V-max, so this connects directly — no divider needed, unlike wiring this module to a 5V-logic board |
| RX | GPIO14 / TXD (physical pin 8) | |
| CH_PD / EN | 3.3V | Must be pulled HIGH to run |
| GPIO0 | 3.3V | HIGH for normal run mode |
Swipe sideways to see every column →
- This is mainly useful for a Pi model without its own Wi-Fi, like an original Pi Zero (non-W) — a Pi Zero W or any Pi 3/4/5 already has Wi-Fi built in and doesn't need this.
- Enable the hardware UART and disable the serial console in raspi-config first, same as any other UART-based component on the Pi.
- Same CH_PD/EN and GPIO0 HIGH-for-run-mode requirement, and same baud-rate-varies-by-firmware caveat, as the other boards.
Related Components
CC2530
Mesh-networking Zigbee radio module for home-automation sensors.
ESP 01
Minimal ESP8266 breakout for adding Wi-Fi to any microcontroller.
HC-05 Bluetooth Module
Add Bluetooth Classic serial communication to Arduino projects with a UART connection, safe logic levels, and a practical pairing workflow.
HC 06
Slave-only Bluetooth serial module — simpler and cheaper than HC-05 for one-way connections.
Related Guides & Projects
Raspberry Pi Pico W and Pico 2 W: Install MicroPython with Thonny or UF2
Hold BOOTSEL, drag the correct UF2 file, open the REPL and blink the onboard LED. Includes the Pico vs Pico W vs Pico 2 W firmware differences and what to do when the drive does not appear.
Raspberry Pi Pico W Web Server in MicroPython: Control an LED and Read a Sensor
Connect the Pico W to WiFi, serve a responsive control page, switch an LED and display the onboard temperature or an external sensor, with timeouts and reconnect handling.
Raspberry Pi Pico Oscilloscope with MicroPython
Convert a Raspberry Pi Pico into a basic 500 kSPS oscilloscope using its 12-bit ADC and MicroPython. Displays waveforms on an SSD1306 OLED or streams samples over USB serial to a Python plotter on your PC.
Self-Hosted Nextcloud NAS on Raspberry Pi 4
Build a private, durable Nextcloud NAS on a Raspberry Pi 4 -- SSD boot instead of a failure-prone SD card, Docker Compose with Redis caching, Tailscale for remote access with zero ports forwarded, and an automated backup strategy that actually runs.