hobbybench

ESP8266 NodeMCU V3 Pinout

NodeMCU V3 (LoLin), 30-pin board, top view with the USB socket at the bottom. Check your board against its silkscreen before wiring power.

ESP8266A0ADC0 to 1 VGGNDVU5 V from USBSD3GPIO10flashSD2GPIO9flashSD1flashCMDflashSD0flashCLKflashGND3V3ENchip enableRSTresetGNDVIN5 V inD0GPIO16wakeD1GPIO5SCLD2GPIO4SDAD3GPIO0FLASH btnD4GPIO2LEDTXD13V3GNDD5GPIO14SCKD6GPIO12MISOD7GPIO13MOSID8GPIO15SSstrappingRXGPIO3UART0TXGPIO1UART0GND3V3
PowerGroundGPIOControlADCUARTSPII2CBoard pin

D-numbers are not GPIO numbers

The silkscreen says D1, your code says GPIO5. The pairs above are the whole trick to programming this board without losing an evening. D1 and D2 are the usual I2C pair; D5 to D7 carry SPI.

Boot pins

GPIO0, GPIO2 and GPIO15 must sit at the right levels at power-up: 0 high, 2 high, 15 low. Anything hanging on them has to respect that, which is why an LED on D4 sometimes stops a board from booting.

V3 versus V2

On the LoLin V3 the two pins beside A0 are G and VU (ground and 5 V from USB). On the older Amica V2 those same positions are printed RSV and are not connected, which is the quickest way to tell the boards apart.

Flash pins

SD0 to SD3, CMD and CLK talk to the onboard flash chip. They are broken out for factory use and should be left alone.

Sources and datasheets

This diagram was cross-checked against the manufacturer documentation below plus at least two independent references before publishing. When they disagreed, the manufacturer won.

More boards and plugs live on the pinouts index.