https://learn.adafruit.com/multi-tasking-the-arduino-part-1/overview
Category: NodeMCU
NodeMCU Pin Map (and what ones you can actually use for stuff)
I found this picture on the internet, and it’s gold.. thank you to whoever made it – I always struggle with which pins you can actually use for stuff, and which pins will stop the thing from booting or flashing if you try and use or do weird stuff (like SD2)
For translation – Pins D10 and D9 are RX/TX for the onboard USB Serial port – so if you are using the USB Serial, you can’t use these pins
D1/D2 – normally I2c (GPIO 4,5) – tested this as well with a Servo Controller Board and I2C Scan tool
So D3 and D4 can only be used for Digital Write’s
D10 and D9 are RX/TX on the USB Serial – so if you want to debug in console, you can’t really use these easily
D1 and D2 work nice for I2c but also work for Digital Read or Write
SD3 works as GPIO10
SD2 is evidently no go – I did an I2c test on GPIO 9 (SD2) and 10 (SD3) and the I2c Scan found the device connected, but trying to use just made the NodeMCU freak and reboot
D5,D6,D7,D8 are all fully usable read and write
D0 – messes with booting up/flashing so I generally stay clear of it.
A0 is Analog Pin