Espressif ESP8266 / NodeMCU
Tiny WiFi for IoT
NodeMCU v1.0 · ESP8266 (ESP-12E)
The classic Wi-Fi dev board: an ESP8266 (Tensilica L106 at 80 or 160 MHz) on an ESP-12E module with 4 MB flash, nine usable GPIOs (D0–D8), one analog input and USB serial, all at 3.3 V.
- CPU
- 80 / 160 MHz
- Digital pins
- 9 (D0–D8)
- Flash
- 4 MB
- Analog
- 1 (A0)
Every header pin at a glance
- 5 safe I/O
- 3 use with care
- 3 avoid
- 6 not available
- 13 power, ground & other
01Pinout
Every pin, live
Labelled as on the board (D0–D8, RX, TX, A0); the detail card shows each pin's GPIO number.
30 of 30 pins match
Hover or tap any pin on the board
RIGHT header · pin 2
D1
Safe to use
Default I2C SCL. A safe general-purpose pin.
Nothing else on the board depends on this pin. A good first choice for sensors, LEDs and buttons.
Can be used as
- I2C
- PWM out
- External interrupt
Signals on this pad
- GPIO5
- D1
- SCL
Full header tables (LEFT, RIGHT)
LEFT · left side
| No. | Pin | Signals | Status |
|---|---|---|---|
| 1 | A0 | The only analog input, 10-bit (0–1023). The board's 220 kΩ / 100 kΩ divider makes full scale about 3.2 V. Never feed it 5 V. | |
| 2 | RSV | Reserved. Not connected to anything you can use. | |
| 3 | RSV | Reserved. Not connected to anything you can use. | |
| 4 | SD3 | SD3 | Not available |
| 5 | SD2 | SD2 | Not available |
| 6 | SD1 | SD1 | Not available |
| 7 | CMD | CMD | Not available |
| 8 | SD0 | SD0 | Not available |
| 9 | CLK | CLK | Not available |
| 10 | GND | Ground | |
| 11 | 3V3 | 3.3 V rail from the on-board regulator. The ESP8266's own supply voltage. | |
| 12 | EN | Chip enable, held HIGH on the board. Pull LOW to switch the chip off. | |
| 13 | RST | Pull LOW to reset, the same as the RST button. Wire D0 to RST to wake from deep sleep. | |
| 14 | GND | Ground | |
| 15 | VIN | 5 V input to the on-board 3.3 V regulator (or 5 V out when powered over USB). |
RIGHT · right side
| No. | Pin | Signals | Status |
|---|---|---|---|
| 1 | D0 | D0, WAKE, LED_BUILTIN_AUX | Caution |
| 2 | D1 | D1, SCL | OK |
| 3 | D2 | D2, SDA | OK |
| 4 | D3 | D3, FLASH button | Avoid |
| 5 | D4 | D4, LED_BUILTIN, Serial1 TX | Avoid |
| 6 | 3V3 | 3.3 V rail from the on-board regulator. The ESP8266's own supply voltage. | |
| 7 | GND | Ground | |
| 8 | D5 | D5, SCLK | OK |
| 9 | D6 | D6, MISO | OK |
| 10 | D7 | D7, MOSI, RXD2 | OK |
| 11 | D8 | D8, CS, TXD2 | Avoid |
| 12 | RX | RXD0 | Caution |
| 13 | TX | TXD0 | Caution |
| 14 | GND | Ground | |
| 15 | 3V3 | 3.3 V rail from the on-board regulator. The ESP8266's own supply voltage. |
02Safety
Pins to avoid, and why
Six flash pins are off-limits and three boot pins need care.
Not available
6 pins
Wired to the flash chip. They're on the header, but using them crashes the board.
- CLKSPI flash. Wired to the module's flash chip. Using it usually freezes or resets the board.
- SD0SPI flash. Wired to the module's flash chip. Using it usually freezes or resets the board.
- SD1SPI flash. Wired to the module's flash chip. Using it usually freezes or resets the board.
- SD2SPI flash. Wired to the module's flash chip. Using it usually freezes or resets the board.
- SD3SPI flash. Wired to the module's flash chip. Using it usually freezes or resets the board.
- CMDSPI flash. Wired to the module's flash chip. Using it usually freezes or resets the board.
Avoid
3 pins
Read at power-up to choose how the chip boots. Wired wrong, the board won't start.
- D3Boot pin: must be HIGH. D3 (GPIO0) is read at power-up and must be HIGH for your sketch to start. Anything that pulls it LOW at boot (a relay module, a pressed button) stops the board running your code.
- D4Boot pin: must be HIGH. D4 (GPIO2) is read at power-up and must be HIGH for your sketch to start. Anything that pulls it LOW at boot (a relay module, a pressed button) stops the board running your code.
- D8Boot pin: must be LOW. GPIO15 must be LOW at power-up (the board has a pull-down). A module that pulls it HIGH at boot, as many relay boards do, stops the board starting.
Use with care
3 pins
Usable with a catch: shared with USB serial, or a limited RTC pin.
- TXUSB serial. Shared with uploads and the Serial Monitor. It also prints boot messages at power-up.
- RXUSB serial. Shared with uploads and the Serial Monitor. A module here can block uploads.
- D0Limited pin. GPIO16 sits in the RTC domain: no interrupts, no I2C and no INPUT_PULLUP (it has a pull-down instead). It also goes HIGH briefly at boot.
03Layout
How the board fits together
An ESP-12E module with a USB-serial chip and a 3.3 V regulator.
Micro-USB + USB-serial
CP2102 or CH340: uploads and Serial
3.3 V regulator
From USB or VIN
ESP-12E (ESP8266)
80/160 MHz · Wi-Fi · 4 MB flash
9 GPIO (D0–D8)
Software PWM, SPI, I2C, interrupts
A0
10-bit ADC through a divider
04Specs
Full specifications
Processor
- Chip
- ESP8266EX32-bit Tensilica L106, 80 MHz (160 MHz option).
- Module
- ESP-12E, 4 MB flash
Wireless
- Wi-Fi
- 802.11 b/g/n, 2.4 GHz
- Bluetooth
- None
Power
- Logic level
- 3.3 VInputs are rated to 3.6 V. Not 5 V tolerant.
- Inputs
- Micro-USB 5 V or VIN
- Per-pin current
- About 12 mA
Peripherals
- GPIO
- 9 usable (D0–D8), plus RX/TX
- PWM
- Software, on every usable pinAbout 1 kHz by default.
- Analog
- 1 input, 10-bitAbout 0–3.2 V through the board's divider.
- Buses
- 1 UART + TX-only UART, SPI, software I2C
05Buses
Where each bus lives
I2C (Wire)
SDA on D2 (GPIO4), SCL on D1 (GPIO5) by default. It's software I2C, so Wire.begin(sda, scl) can move it.
SPI
Hardware SPI: SCLK D5, MISO D6, MOSI D7, CS D8 (a boot pin that must be LOW at power-up).
UART
Serial on RX/TX (shared with USB). Serial.swap() moves it to D7 (RX) and D8 (TX). Serial1 is transmit-only on D4.
Analog
One input, A0, 0–1023 over about 0–3.2 V.
06Power & start
Power it up and get connected
Power options
- Micro-USB5 V from your computer; also uploads and Serial.
- VIN pin5 V into the on-board 3.3 V regulator.
- 3V3 pinsThe 3.3 V rail the ESP8266 runs on.
- 1
Plug in micro-USB
Install the CP2102 or CH340 driver if no port appears.
- 2
Install ESP8266 support
Tools → Board → esp8266 → NodeMCU 1.0 (ESP-12E Module)Then pick the new port.
- 3
Blink the on-board LED
File → Examples → ESP8266 → BlinkLED_BUILTIN is GPIO2 (D4) and lights when the pin is LOW.
- 4
No board on your desk?
Open a NodeMCU circuit in the SolderHub Simulator below.
07Versions
Which version do you have?
NodeMCU v1.0
- USB chip
- CP2102
LoLin NodeMCU V3
- USB chip
- CH340G
- Extra pin
- VU: 5 V straight from USB
08Gotchas
Things that trip people up
01
Board won't boot with a module attached
Check D3, D4 and D8. D3 and D4 must be HIGH at power-up and D8 must be LOW. Relay boards on D8 are the usual culprit.
02
Don't use SD0–SD3, CMD or CLK
They're on the header but wired to the flash chip. Using them freezes or resets the board.
03
It's a 3.3 V board
No pin is rated for 5 V. Level-shift 5 V sensor outputs.
04
Only one analog input
A0 reads about 0–3.2 V. For more channels, add an I2C ADC.
05
Interrupt handlers need IRAM_ATTR
Without it the board can crash when the interrupt fires.
09SolderHub Simulator
Wire up the Espressif ESP8266 / NodeMCU without the hardware
Build and run circuits in the SolderHub Simulator, right in your browser.
Board Basics
Introduction, pinout, and protocols — all in one guide.
Sensor Modules & Library
Wiring sensors and modules, plus the library you need to talk to them.
Sensor Integration
Coming soon
Library & Setup
Coming soon
Projects
3More From This Board
6More Espressif ESP8266 / NodeMCU guides worth reading.
XIAO ESP32S3 Pinout: D0–D10, ADC, Touch, I2C, SPI and Battery
7m
ESP32 MicroPython Weather Web Server: Live DHT22 Readings with Auto-Refresh
17m
MicroPython ESP32 Web Server: Control an LED or Relay from Your Browser
16m
MicroPython SSD1306 OLED on ESP32: Wiring, Text, Graphics and Sensors
5m
ESP32 Dual Core and FreeRTOS: Tasks on Core 0 and Core 1, Queues and Mutexes
6m
ESP32 Hall Sensor: hallRead(), Core 3.x Removal and External Sensor Alternatives
10m
