When it comes to ESP8266 boards, the WeMos D1 Mini stands out as a great choice for those just getting started with IoT. It’s small, well-supported, and ridiculously cheap, with prices as low as $3 USD per unit. This affordability has made it a favored option among both hobbyists and professionals alike.
In this article, we will look at the WeMos D1 Mini pinout in detail.
WeMos D1 Mini Pinout
The D1 Mini has 16 pins in total. The pinout is as follows:

Let’s take a closer look at the WeMos D1 Mini pins and their functions one by one.
WeMos D1 Mini GPIO Pins
The D1 Mini has 11 GPIO pins that can be programmed to perform a variety of functions. Each GPIO can be configured with an internal pull-up or pull-down resistor, or it can be set to high impedance.

Keep in mind that all pins are 3.3V logic level; exceeding this voltage will cause damage to the board.
Which GPIOs are safe to use?
Although the D1 Mini has a lot of pins with various functions, some of them may not be suitable for your projects. The table below shows which pins are safe to use and which pins should be used with caution.
- – Your top priority pins. They are perfectly safe to use.
- – Pay close attention because their behavior, particularly during boot, can be unpredictable. Use them only when absolutely necessary.
- – It is recommended that you avoid using these pins.
Label | GPIO | Safe to use? | Reason |
D0 | GPIO16 | HIGH at boot, used to wake up from deep sleep | |
D1 | GPIO5 | ||
D2 | GPIO4 | ||
D3 | GPIO0 | connected to FLASH button, boot fails if pulled LOW | |
D4 | GPIO2 | HIGH at boot, boot fails if pulled LOW | |
D5 | GPIO14 | ||
D6 | GPIO12 | ||
D7 | GPIO13 | ||
D8 | GPIO15 | Required for boot, boot fails if pulled HIGH | |
RX | GPIO3 | Rx pin, used for flashing and debugging | |
TX | GPIO1 | Tx pin, used for flashing and debugging | |
A0 | ADC0 | Analog input pin, cannot be configured as output |
The image below shows which GPIO pins can be used safely.

WeMos D1 Mini ADC Pins
The D1 Mini has a single analog input, A0. This analog input pin can measure voltages from 0 to 3.3V.

It’s connected to a built-in SAR ADC with a resolution of 10-bits, which means it can differentiate 1024 (2^10) different voltage levels. In other words, it can convert input voltages ranging from 0 to 3.3V (operating voltage) into integer values ranging from 0 to 1024. This results in a resolution of 3.3 volts / 1024 units, or 0.0032 volts (3.2 mV) per unit.
WeMos D1 Mini SPI Pins
The D1 Mini has one hardware SPI interface (HSPI). It supports the general-purpose SPI features listed below:
- Full-duplex SPI communication
- 4 timing modes of the SPI format transfer
- Clock frequency is 20 MHz at maximum
- Up to 64-Byte FIFO

It’s worth noting that while there is only one SPI bus, software SPI (also known as bit-banging) can be implemented on any GPIO pins if additional SPI buses are required, but at the expense of speed and possibly increased CPU usage.
WeMos D1 Mini I2C Pins
The D1 Mini has a single I2C interface which is realized via software programming (‘bit-banging’), meaning any GPIO pin can be defined to act as SCL and SDA. It works quite well, and the ESP8266 is fast enough to match ‘Arduino level’ speed (clock frequency is 100 kHz at maximum).
By default, GPIO4 (SDA) and GPIO5 (SCL) are used for I2C communication and are the default I2C pins for many libraries and examples you will find.

WeMos D1 Mini UART Pins
The D1 Mini has a single usable UART (Universal Asynchronous Receiver/Transmitter) interface, which is used for programming as well as general serial communication (e.g., sending or receiving data to and from a computer or a serial interface sensor).

These pins are connected through to the CH340 USB-to-Serial converter so they should not be connected to or used unless you are absolutely certain you want to because you will also be getting USB traffic on these!
WeMos D1 Mini PWM Pins
Almost all digital pins (except D0) can produce a Pulse Width Modulation (PWM) signal. This is useful for controlling the speed of motors, dimming LEDs, and more.

Note that the PWM signal has a 10-bit resolution, and the PWM frequency range is adjustable between 1000 μs and 10000 μs, i.e., between 100 Hz and 1 kHz.
WeMos D1 Mini Power Pins
The WeMos D1 Mini has several pins dedicated to power:

5V pin: When connected via USB, this pin outputs a 5V supply drawn directly from the USB port. It can also be used to power the board when using an external power source.
3V3 pin: This pin provides a 3.3V output which can be used to power external components. The power is drawn from the on-board voltage regulator and has a limited supply current; you can get up to 600mA from it.
GND: is the ground pin.
WeMos D1 Mini Interrupt Pins
All GPIOs (except GPIO16) can be configured to trigger an interrupt on a rising, falling, or a change of state. This is essential for event-driven tasks like responding to a button press or a sensor signal.
WeMos D1 Mini Control Pins

The RST pin is the reset pin. Pulling this pin low resets the microcontroller, which is the same as pressing the reset button on the board.
The FLASH pin is used by the D1 Mini to determine when to boot into the bootloader. By pulling this pin low during power-up, you can put the D1 Mini into flashing mode, which is necessary for programming the board with new firmware.
The WAKE pin is used to wake the D1 Mini from deep sleep.