ESP8266 – Wemos D1 Mini

ESP8266 – Wemos D1 Mini

 

Equivalent Pin number / Arduino Digital Pin

WeMos D1 mini Pin Number  Arduino IDE Pin Number
D0 16
D1 5
D2 4
D3 0
D4 2
D5 14
D6 12
D7 13
D8 15
TX 1
RX 3

Usage in source code :

void setup() {
  Serial.begin(115200);
  pinMode(5, OUTPUT); //Digital pin 1 is pin 5 on the ESP8266
}

Or

void setup() {
  Serial.begin(115200);
  pinMode(D1, OUTPUT); //Digital pin 1 is pin 4 on the ESP8266 and D1 as a constant
}