Skip to content
Board reference

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

A0RSVRSVSD3SD2SD1CMDSD0CLKGND3V3ENRSTGNDVIND0D1D2D3D43V3GNDD5D6D7D8RXTXGND3V3

Hover or tap any pin on the board

RIGHT header · pin 2

D1

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.PinSignalsStatus
1A0The 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.
2RSVReserved. Not connected to anything you can use.
3RSVReserved. Not connected to anything you can use.
4SD3SD3Not available
5SD2SD2Not available
6SD1SD1Not available
7CMDCMDNot available
8SD0SD0Not available
9CLKCLKNot available
10GNDGround
113V33.3 V rail from the on-board regulator. The ESP8266's own supply voltage.
12ENChip enable, held HIGH on the board. Pull LOW to switch the chip off.
13RSTPull LOW to reset, the same as the RST button. Wire D0 to RST to wake from deep sleep.
14GNDGround
15VIN5 V input to the on-board 3.3 V regulator (or 5 V out when powered over USB).

RIGHT · right side

No.PinSignalsStatus
1D0D0, WAKE, LED_BUILTIN_AUXCaution
2D1D1, SCLOK
3D2D2, SDAOK
4D3D3, FLASH buttonAvoid
5D4D4, LED_BUILTIN, Serial1 TXAvoid
63V33.3 V rail from the on-board regulator. The ESP8266's own supply voltage.
7GNDGround
8D5D5, SCLKOK
9D6D6, MISOOK
10D7D7, MOSI, RXD2OK
11D8D8, CS, TXD2Avoid
12RXRXD0Caution
13TXTXD0Caution
14GNDGround
153V33.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. 1

    Plug in micro-USB

    Install the CP2102 or CH340 driver if no port appears.

  2. 2

    Install ESP8266 support

    Tools → Board → esp8266 → NodeMCU 1.0 (ESP-12E Module)

    Then pick the new port.

  3. 3

    Blink the on-board LED

    File → Examples → ESP8266 → Blink

    LED_BUILTIN is GPIO2 (D4) and lights when the pin is LOW.

  4. 4

    No board on your desk?

    Open a NodeMCU circuit in the SolderHub Simulator below.

07Versions

Which version do you have?

THIS PAGE

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