Preview build — page text is a draft awaiting human review. Code badges come from real compiles. The flasher is real but not yet hardware-tested; the Playground is still a preview.

NodeMCU ESP8266

Interactive NodeMCU ESP8266 pinout: D-pin to GPIO mapping, boot pins D3/D4/D8, the 0–3.2 V A0 input, Arduino IDE setup and a compile-checked blink.

Community draft — report a mistake

CPUESP8266EX, Tensilica L106, 80/160 MHz
Flash4 MB (ESP-12E module)
WirelessWi-Fi 802.11 b/g/n (2.4 GHz) — no Bluetooth
AnalogOne input (A0), about 0–3.2 V through the on-board 220k/100k divider
USB-serialCP2102 or CH340 (varies by maker)
Typical price₹200–350 (indicative)

The NodeMCU is the board that made Wi-Fi projects affordable: an ESP8266 ESP-12E module, a USB-serial chip and a 3.3 V regulator on a breadboard-friendly stick. It is still everywhere in Indian kits and college labs.

It has one CPU core, no Bluetooth and a single analog input, so new designs usually pick an ESP32. But for a simple Wi-Fi relay, a sensor that posts to MQTT, or a dashboard on your phone, it remains a cheap, well-supported choice.

The silkscreen uses D-numbers that don’t match the GPIO numbers — the main source of confusion. The interactive pinout below shows both, and marks the three boot pins you must keep in the right state at power-up.

Interactive pinout

Hover or tap a pin for its functions and traps. Filter to light up every I2C, ADC or boot pin.

  • Safe for most uses
  • Works, with a caveat
  • Avoid unless you know why
  • Power / control

Boot pins: D3 (GPIO0), D4 (GPIO2) high, D8 (GPIO15) low. Those levels at reset decide whether the board runs your sketch. A relay or sensor that pulls one the wrong way stops the board from booting.

Never use SD0–SD3, CMD or CLK. They drive the flash chip. Touching them crashes or bricks the running firmware.

D-labels are not GPIO numbers. In code, D5 means GPIO14. Use the D-names (D1, D2 …) in Arduino sketches and the GPIO numbers in MicroPython. The pinout below lists both.

Set up your computer

  1. Install Arduino IDE 2.x from arduino.cc.
  2. File → Preferences → Additional boards manager URLs: https://arduino.esp8266.com/stable/package_esp8266com_index.json
  3. Boards Manager → install esp8266 by ESP8266 Community (we compile against esp8266 3.1.2).
  4. Tools → Board → NodeMCU 1.0 (ESP-12E Module), then pick the port that appears when you plug the board in.

First program

Verified — core esp8266 3.1.2, 3 Nov 2026Compile-only
blink-nodemcu.inoArduino C++Open in PlaygroundOpen in PlaygroundFlash
// First program for the NodeMCU (ESP8266): blink the blue LED on the ESP-12 module.
// LED_BUILTIN is GPIO2 (D4) and is INVERTED (LOW = on). GPIO2 must be high at boot,
// which is why the LED is wired that way — keep other loads off D4.
void setup() {
  Serial.begin(115200);
  pinMode(LED_BUILTIN, OUTPUT);
  Serial.println();
  Serial.println(F("FlashReady: NodeMCU blink"));
}

void loop() {
  digitalWrite(LED_BUILTIN, LOW);   // on
  delay(500);
  digitalWrite(LED_BUILTIN, HIGH);  // off
  delay(500);
}

Components with NodeMCU ESP8266

Common errors

Board resets and prints garbage at 74880 baud

That is the boot ROM's message. Set the Serial Monitor to 74880 to read it — it usually says "rst cause" and points to a power or boot-pin problem.

espcomm_upload_mem failed / Failed to connect

Wrong port, a charge-only cable, or a missing CP2102/CH340 driver. Hold FLASH while the upload starts if auto-reset fails.

WDT reset during Wi-Fi or long loops

Long blocking loops starve the Wi-Fi stack. Add yield() or delay(0) inside long loops and avoid busy-waiting.

analogRead(A0) maxes out too early

The NodeMCU divider (220 kΩ / 100 kΩ) maps about 0–3.2 V to 0–1023. Do not feed more than 3.3 V; for 5 V signals add your own divider.

Projects for NodeMCU ESP8266

Winter fog risk indicator from the dew point (NodeMCU + SHT31)

NodeMCUEasy

Temperature, dew point and a flashing FOG warning before the early drive or school run.

1 h · Weather

₹1,020 parts cost, about $12Verified core 3.1

LPG cylinder gas-left monitor with refill alert (NodeMCU + HX711)

NodeMCUMedium

Shows kg of gas left in the cylinder and pings your phone when it’s time to book.

3 h · India utility

₹1,470 parts cost, about $17Verified core 3.1

Internet latency display on a 4-digit LED (NodeMCU ESP8266 + TM1637)

NodeMCUEasy

Your internet latency in milliseconds on a bright 4-digit display.

30 min · Network & ISP tools

₹510 parts cost, about $6Verified core 3.1

Pump dry-run cut-off with a water flow sensor (NodeMCU ESP8266)

NodeMCUMedium

No water in the pipe within 45 s? The pump stops and waits 30 minutes.

3 h · India utility

₹1,490 parts cost, about $18Verified core 3.1

Household water usage meter in litres (NodeMCU + flow sensor)

NodeMCUEasy

Litres per day from your overhead tank, plus a “tap left open?” warning.

2 h · India utility

₹1,115 parts cost, about $13Verified core 3.1

Wi-Fi relay switch for a lamp (NodeMCU ESP8266)

NodeMCUEasy

Turn a lamp on and off from a web page on your phone.

1 h · Home automation

₹670 parts cost, about $8Verified core 3.1

Wi-Fi robot car driven from any phone browser (NodeMCU + L298N)

NodeMCUMedium

Drive it from a phone browser over its own Wi-Fi — no app to install.

2.5 h · Robotics

₹1,270 parts cost, about $15Verified core 3.1

↑↓ to move · Enter to open