Same-day dispatch before 2 PM · Free delivery over ₹999 · GST invoices Get the appPrices incl. GST
Geekobot
Snap & SendNEWGeeko AIWhere's myOrder
Log in
Products
  • Projects
    • Component guidesHow parts work, with code you can run
    • Learning pathsFrom your first LED to your first robot
    • Workshops & eventsOnline sessions for makers and classes
    • ElectrolarkFree guided builds, simulator and certificates
    • Students & teachersStudent discount and classroom help
    • CommunityShare builds and ask other makers
    • CalculatorsOhm's law, LED resistor, 555 and 100+ more
    • Circuit builderWire parts and run the circuit, powered by Electrolark
    • Geeko AIAsk what to buy or how to wire it
    • Snap & SendPhotograph a part or list, we find it
    • Part finderAnswer a few questions, get the right part
    • Compatibility checkWill these two parts work together?
    • Compare partsSpecs side by side
    • Business & bulk ordersGST invoices, credit and volume prices
    • Request a quotationSend your list, get a quote
    • Classroom kitsPer-student kits and lab bundles
    • Gift cardsFor students, teams and events
  • Atal Tinkering Lab
BOM to cart
Geekobot

Components, kits and know-how for makers, students, engineers, labs and businesses across India.

Ask Geeko AIOrders, parts and projects, any timeEmail supportReply within 1 working dayGet the Geekobot appAdd it to your home screen, free

Follow us

Shop

  • Boards & SBCs
  • Sensors & Modules
  • IoT & Wireless
  • Drone & FPV
  • 3D Printing
  • Filaments & Resins
  • Motors & Drivers
  • Power & Batteries
  • Semiconductors
  • Passive
  • Displays & LEDs
  • Switches & Relays
  • Wires & Cables
  • Prototyping
  • Tools & Test
  • Robotics
  • STEM Kits
  • Atal Tinkering Lab
  • Mechanical Parts
  • Audio

Orders

  • Track your order
  • Help & support
  • Shipping and delivery
  • Refunds and cancellation
  • Contact us

Learn

  • Projects
  • Geeko AI project assistant
  • Learning paths
  • Guides
  • Calculators
  • Electrolark: free guided builds

Part tools

  • Part finder
  • Compare parts
  • Will it work with my board?

Institutions

  • Classroom kits
  • Atal Tinkering Lab
  • Students & teachers
  • Workshops & Events

Business

  • Business & education
  • Request a quotation
  • BOM bulk upload
  • Quick order by SKU

Company

  • About Geekobot
  • Community
  • Gift cards
  • Terms & conditions
  • Privacy policy
  • Product directory
  • Sitemap

© 2026 Geekobot, a trade name of OLatus Systems Private Limited. All rights reserved.

20, 1st Floor, Neeladri Complex, 10th Cross, Sampige Rd, 2nd Main, Malleshwaram, Bengaluru, Karnataka 560003 · GSTIN 29AACCO0462F1ZM

+91 91810 15607 · connect@geekobot.in · Monday to Saturday, 10 AM to 2 PM IST

UPI · CARDS · NETBANKING · GST INVOICES

ShopProjectsGeeko AIGuides
Compare 0 parts →
Log in

Shop by category

Shop all components
  • Boards & SBCs1,910 products
    • Alternative Single Board Computers
    • Arduino Ecosystem
    • FPGA & Logic Boards
    • Microcontroller & Wireless Boards
    View all
  • Sensors & Modules4,701 products
    • Biomedical & Heart Rate
    • Current, Voltage & Power
    • Force, Weight & Pressure
    • Gas, Weather & Environmental
    View all
  • IoT & Wireless2,314 products
    • RF Modules
    • RFID & NFC
    • Antennas & RF Accessories
    • Cameras & Smart Vision
    View all
  • Drone & FPV3,558 products
    • Flight Control & Navigation
    • FPV Video & Optics
    • Frames & Structural Parts
    • Motors & Propulsion
    View all
  • 3D Printing2,204 products
    • 3D Printers
    • 3D Scanners & Digitizers
    • Laser Engravers & Cutters
    • Material Management & Upgrades
    View all
  • Filaments & Resins1,472 products
    • Filaments
    • Photopolymer Resins
    View all
  • Motors & Drivers463 products
    • BLDC Motor Drivers
    • DC & Geared Motors
    • DC Motor Drivers
    • Linear Actuators & Solenoids
    View all
  • Power & Batteries557 products
    • Battery Holders & Connectors
    • Breadboard Power
    • Chargers & BMS
    • DC-DC Converters
    View all
  • Semiconductors295 products
    • Diodes & Rectifiers
    • Interface & RF Encoder ICs
    • Logic ICs (74xx)
    • Logic ICs (CD4000)
    View all
  • Passive67 products
    • Capacitors
    • Circuit Protection
    • Crystals & Oscillators
    • Inductors
    View all
  • Displays & LEDs572 products
    • 7-Segment & Dot Matrix
    • Addressable LEDs
    • Character LCDs
    • Graphic LCDs
    View all
  • Switches & Relays184 products
    • Keypads & Touch
    • Push Buttons & Tactile
    • Relay Modules
    • Relays
    View all
  • Wires & Cables233 products
    • Board-to-Wire Connectors
    • Crimp & Splice
    • Headers & Dupont
    • Heat Shrink & Sleeving
    View all
  • Prototyping101 products
    • Breadboards
    • Interface Modules
    • PCBs & Perfboards
    View all
  • Tools & Test717 products
    • Bench Power Supplies
    • Hand Tools
    • Measuring Tools
    • Meters & Testers
    View all
  • Robotics180 products
    • Humanoid & Legged Robots
    • Robot Chassis & Platforms
    • Robotic Arms & Grippers
    • Wheels & Casters
    View all
  • STEM Kits268 products
    • Arduino Learning Kits
    • Coding & IoT Kits
    • Early Coding (Ages 3-8)
    • Invention Kits
    View all
  • Atal Tinkering Lab196 products
    • Package 1: Electronics, Robotics, IoT and Sensors
    • Package 2: Rapid Prototyping Tools
    • Package 3: Mechanical, Electrical and Measurement Tools
    • Package 4: Power Supply, Accessories and Safety Equipment
    View all
  • Mechanical Parts212 products
    • Bearings
    • Brackets & Mounts
    • Couplers
    • Fasteners & Standoffs
    View all
  • Audio109 products
    • Amplifier Modules
    • Buzzers & Sirens
    • Speakers
    View all
  1. Home
  2. ›Guides
  3. ›Boards & Microcontrollers
  4. ›ESP8266 NodeMCU

Component guide · Beginner · 3 min read

ESP8266 NodeMCU

Pinout, D-Pin Mapping and Wi-Fi Basics

By Geekobot Learning Team · Updated 24 Oct 2026

On this page
Short answerNodeMCU vs Wemos D1 Mini vs ESP-01NodeMCU D-pin to GPIO mappingSet up the ESP8266 in the Arduino IDEESP8266 vs ESP32: should you still buy an ESP8266?Power and 5 V modulesTry itCommon mistakesFAQsParts and next steps
Short answer

The ESP8266 is a 3.3 V Wi-Fi microcontroller, and NodeMCU is the most common board built around it. Its D0 to D8 labels map to GPIO numbers, so D1 is GPIO 5 and D2 is GPIO 4. It has one analog input (A0, 0 to 3.3 V on NodeMCU) and about nine usable GPIO pins. For new projects the ESP32 is usually the better buy.

Key specs at a glance

Chip
ESP8266EX (Tensilica L106, 80 or 160 MHz)
Wi-Fi
2.4 GHz 802.11 b/g/n, station and access point
Logic level
3.3 V, not 5 V tolerant
Usable GPIO
About 9 (D1, D2, D5, D6, D7 safest)
ADC
One, 10-bit, 0 to 3.3 V on NodeMCU (0 to 1 V on bare module)
Flash
4 MB on NodeMCU and D1 Mini
Power
5 V micro USB or VIN; 3.3 V at 3V3; 170 mA peaks when transmitting
01

NodeMCU vs Wemos D1 Mini vs ESP-01

BoardSizeUSBChoose it for
NodeMCU (ESP-12E/F)58 x 31 mm, 30 pinsYes (CP2102 or CH340)Beginners, breadboard prototypes
Wemos / LOLIN D1 Mini34 x 26 mm, 16 pinsYes (CH340)Compact builds, stackable shields
ESP-01 / ESP-01S24 x 14 mm, 8 pinsNo, needs a USB adapterAdding Wi-Fi to an Arduino, relay switches
NodeMCU (ESP-12E/F)
Size:
58 x 31 mm, 30 pins
USB:
Yes (CP2102 or CH340)
Choose it for:
Beginners, breadboard prototypes
Wemos / LOLIN D1 Mini
Size:
34 x 26 mm, 16 pins
USB:
Yes (CH340)
Choose it for:
Compact builds, stackable shields
ESP-01 / ESP-01S
Size:
24 x 14 mm, 8 pins
USB:
No, needs a USB adapter
Choose it for:
Adding Wi-Fi to an Arduino, relay switches
02

NodeMCU D-pin to GPIO mapping

The silkscreen numbers are not GPIO numbers. In code, use the GPIO number or the D-constant (D1), never the printed number as a plain integer.

LabelGPIOSafe to use?Notes
D016PartlyNo PWM/interrupt; wake from deep sleep when wired to RST
D15YesDefault SCL
D24YesDefault SDA
D30CarefulBoot pin, must be high at boot (FLASH button)
D42CarefulBoot pin, onboard LED (active low)
D514YesSCK
D612YesMISO
D713YesMOSI
D815CarefulBoot pin, must be low at boot
RX, TX3, 1AvoidSerial and uploads
A0ADCYesSingle analog input, 0 to 3.3 V
D0
GPIO:
16
Safe to use?:
Partly
Notes:
No PWM/interrupt; wake from deep sleep when wired to RST
D1
GPIO:
5
Safe to use?:
Yes
Notes:
Default SCL
D2
GPIO:
4
Safe to use?:
Yes
Notes:
Default SDA
D3
GPIO:
0
Safe to use?:
Careful
Notes:
Boot pin, must be high at boot (FLASH button)
D4
GPIO:
2
Safe to use?:
Careful
Notes:
Boot pin, onboard LED (active low)
D5
GPIO:
14
Safe to use?:
Yes
Notes:
SCK
D6
GPIO:
12
Safe to use?:
Yes
Notes:
MISO
D7
GPIO:
13
Safe to use?:
Yes
Notes:
MOSI
D8
GPIO:
15
Safe to use?:
Careful
Notes:
Boot pin, must be low at boot
RX, TX
GPIO:
3, 1
Safe to use?:
Avoid
Notes:
Serial and uploads
A0
GPIO:
ADC
Safe to use?:
Yes
Notes:
Single analog input, 0 to 3.3 V
03

Set up the ESP8266 in the Arduino IDE

  1. 1
    Add the ESP8266 board manager URL (from the esp8266/Arduino project) in File > Preferences.
  2. 2
    Install esp8266 by ESP8266 Community in Boards Manager.
  3. 3
    Select NodeMCU 1.0 (ESP-12E Module) or LOLIN(WEMOS) D1 R2 & mini, and your COM port.
Connect to Wi-Fi and blink · Arduino C++Verify & upload in Electrolark
#include <ESP8266WiFi.h>

void setup() {
  Serial.begin(115200);
  pinMode(LED_BUILTIN, OUTPUT);
  WiFi.begin("YourNetwork", "YourPassword");
  while (WiFi.status() != WL_CONNECTED) { delay(250); Serial.print("."); }
  Serial.println(WiFi.localIP());
}

void loop() {
  digitalWrite(LED_BUILTIN, LOW);    // LED is active low
  delay(500);
  digitalWrite(LED_BUILTIN, HIGH);
  delay(500);
}
04

ESP8266 vs ESP32: should you still buy an ESP8266?

The ESP32 costs only a little more and adds a second core, Bluetooth, 18 ADC channels and far more GPIO. Buy an ESP8266 when you need a very small, cheap Wi-Fi node (D1 Mini), are following an older tutorial, or run the many Tasmota and ESPHome devices built on it. For anything new and ambitious, choose the ESP32.

05

Power and 5 V modules

Feed 5 V to the USB port or VIN pin; the onboard regulator makes 3.3 V. The pins are not 5 V tolerant, so a 5 V sensor output needs a level shifter or divider. The single ADC accepts 0 to 3.3 V on NodeMCU and D1 Mini thanks to an onboard divider, but only 0 to 1 V on a bare ESP-12 module.

06

Try it: ADC resolution calculator

Change the values and the diagram and results update as you type.

07

Common mistakes to avoid

  • !Using the printed D-number as a GPIO number in code (digitalWrite(1, ...) is TX, not D1).
  • !Pulling D3, D4 or D8 the wrong way at boot, so the board never starts.
  • !Expecting more than one analog input.
  • !Blocking the loop for long periods; the Wi-Fi stack needs the CPU back, or the watchdog resets the board. Use yield() or short delays.
  • !Feeding 5 V signals into the GPIO pins.
08

Frequently asked questions

What is the difference between ESP8266 and NodeMCU?

ESP8266 is the Wi-Fi chip. NodeMCU is a development board (and originally a Lua firmware) that puts the chip on a USB board with a regulator and pin headers.

How many GPIO pins does the ESP8266 have?

NodeMCU exposes 11 digital pins, but only about 5 (D1, D2, D5, D6, D7) are free of boot or serial duties. Plan around that.

Can I program an ESP8266 with the Arduino IDE?

Yes. Install the ESP8266 core via Boards Manager; most Arduino libraries and functions work with it.

Is the ESP8266 5 V tolerant?

Officially no. The chip maker rates GPIO at 3.6 V maximum. Use a level shifter for 5 V signals.

Which board is better, ESP8266 or ESP32?

The ESP32 for almost all new projects: more pins, two cores, Bluetooth and better ADC. The ESP8266 is fine for simple Wi-Fi switches and sensors where cost and size matter.

Parts for this guide

  • ESP-01 ESP8266 Serial Wi-Fi Transceiver Module
    ₹131View
  • ESPresso Lite V2.0 ESP8266 WROOM-02 IoT Wi-Fi Dev Board
    ₹892View
  • 4-Channel Logic Level Converter (BSS138)
    ₹20View
Shop Wi-Fi & Bluetooth ModulesShop ESP32 & Wireless Boards

Calculators

ADC resolution calculatorPWM duty cycle calculator

Terms in this guide

MicrocontrollerA single chip with a processor, memory and input/output pins that runs one program, such as the ATmega328P or ESP32.GPIOGeneral-purpose input/output: a microcontroller pin that your code can read or drive.ADCAnalog-to-digital converter: turns a voltage into a number. A 10-bit ADC gives 0 to 1023; a 12-bit ADC gives 0 to 4095.Strapping pinA pin whose level at reset selects a boot mode, such as GPIO 0, 2, 12 and 15 on the ESP32.Logic levelThe voltage that represents a digital high: 5 V on classic Arduinos, 3.3 V on ESP32, Pico and Raspberry Pi.Deep sleepA low-power mode where most of a microcontroller is switched off, cutting current to microamps between tasks.

Projects that use it

Put this into practice: 9 step-by-step builds in our project library use parts from this guide.

Beginner · 1–2 hoursWi-Fi smart switchView projectBeginner · 1–2 hoursWi-Fi door sensorView projectBeginner · 1–2 hoursWi-Fi fridge thermometerView project
Browse all 9 projects

Keep learning

Component guideBeginnerESP32 GuideThe ESP32 is a low-cost 3.3 V microcontroller from Espressif with built-in Wi-Fi and Bluetooth, used for IoT devices, smart-home controllers and web dashboards.5 min read · Boards & MicrocontrollersHow-toIntermediate3.3 V vs 5 V LogicYou need level shifting when a 5 V device sends signals to a 3.3 V board such as an ESP32 or Raspberry Pi Pico, because 5 V on their pins can damage them.4 min read · Prototyping & WiringComponent guideBeginnerArduino UnoThe Arduino Uno is a beginner-friendly microcontroller board that reads sensors and controls LEDs, motors and relays using simple C++ programs called sketches.5 min read · Boards & MicrocontrollersComparisonBeginnerDHT11 vs DHT22DHT11 vs DHT22 compared: accuracy, range and sampling rate, plus wiring, pull-up, Arduino/ESP32 code and when to pick a BME280 or SHT31.3 min read · Sensors

Sources

  • ESP8266EX datasheet (Espressif Systems)
  • ESP8266 Arduino core documentation (esp8266/Arduino)
  • NodeMCU DevKit schematic

Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.

On this page
Short answerNodeMCU vs Wemos D1 Mini vs ESP-01NodeMCU D-pin to GPIO mappingSet up the ESP8266 in the Arduino IDEESP8266 vs ESP32: should you still buy an ESP8266?Power and 5 V modulesTry itCommon mistakesFAQsParts and next steps
Need a hand?Ask Geeko AI which part fits your project, or talk to the Geekobot team.Ask Geeko AIHelp & support

Parts for this guide1 item · ₹229

ESP8266 NodeMCU Development Board (UNO Form Factor)

Run itChange the inputs and watch the output
Built-in LED (active low) OFF
Serial monitor115200 baud
.

A simulation of the sketch above, so you know what to expect. Real readings vary with your parts and wiring.

Ask the Community

Ask a question