Wemos Board. Usable pins for general I/O?

Hi! I recently purchased some Wemos boards to test them out (D1, D1R2 and D1 mini)
Soon after trying my first DHT22 project, not being able to get a reading from the sensor, I tried moving the data pin to another IO in the Wemos. Then it started to work

So I realized that from the D0...D8 pins that are allegedly exposed as "General I/O pins", it looks like 3 of them (at least D3/4/8) are reserved for special operations and can't be tied to a different value, at least during bootup.

So am I missing something and maybe there's still a way ot take advantage of these pins? If not, why are they labeled as D0-D8 if they are not usable for general IO?

Thanks

GPIO0: pull low during boot for flash mode (connects to a push button). Other than that, usable as GPIO but beware of waht you connect to it.
GPIO1, 3: TX and RX (Serial). Also usable as GPIO if not using serial.
GPIO2: is pulled up during boot & internal LED (active LOW).
GPIO15: fixed external pull-down (for boot).
GPIO4, 5, 12-14, 16: nothing special.

So you have 11 usable GPIO including the Serial pins plus the analog input, but some you have to be aware of what you connect to them. Anything that pulls it's pin low, is not suitable for GPIO0, for example. Using GPIO2 as output activates the internal LED if set LOW.

You have to look up yourself how WeMOS maps the GPIO to D numbers. There's no logic in that.

SO yes, it's kind of what I was understanding, they are not like GENERAL GENERAL purpose IO pins...you need to put special attention to those ones. Something that puts a "heavy" pulldown can't be plugged into GPIO0, for example.
At the end, all that's left for REALLY generic use of D-IO's are 6 pins. I can't live with serial debugging...
Thanks!

GPIO2 is the debug serial pin - you can use that for output-only, it's Serial1.

Of course of you mess up an OTA update and it crashes before you can upload a new sketch you still need the regular TX/RX to recover :slight_smile:

The other special pins are perfectly usable for many applications, it just needs a bit of planning on what you connect where.

Here are the associations between ESP12 pins and Wemos D1 pins:
Pin Function ESP-8266 Pin
TX TXD TXD
RX RXD RXD
A0 Analog input, max 3.3V input A0
D0 IO GPIO16
D1 IO, SCL GPIO5
D2 IO, SDA GPIO4
D3 IO,10k Pull-up GPIO0
D4 IO, 10k pull-up, BUILTIN_LED GPIO2
D5 IO, SCK GPIO14
D6 IO, MISO GPIO12
D7 IO, MOSI GPIO13
D8 IO,10k pull-down, SS GPIO15
G Ground GND
5V 5V –
3V3 3.3V 3.3V
RST Reset RST