Safe GPIO pins
Safe uncomplicated general-purpose I/O choices include D1 (GPIO5) and D2 (GPIO4) which also provide hardware I2C (SCL/SDA). D5 (GPIO14), D6 (GPIO12) and D7 (GPIO13) are ideal for SPI or PWM. Note that all pins operate strictly at 3.3V logic (NOT 5V tolerant).
ADC and analog pins
The A0 pin accepts analog inputs from 0 to 3.3V thanks to an onboard 220k/100k voltage divider that scales the voltage down to the internal 0–1.0V ADC TOUT range of the ESP8266EX.
I2C, SPI and UART pins
Default hardware I2C uses D1 (SCL, GPIO5) and D2 (SDA, GPIO4). Hardware HSPI uses D5 (SCLK, GPIO14), D6 (MISO, GPIO12), D7 (MOSI, GPIO13) and D8 (CS, GPIO15). Primary UART0 is routed to RX (GPIO3) and TX (GPIO1) via the CP2102 bridge.
Strapping and boot pins
Three boot strapping pins must be kept at specific logic levels during reset: D3 (GPIO0) must be HIGH for normal flash execution (LOW triggers UART download mode); D4 (GPIO2) must be HIGH; D8 (GPIO15) must be held LOW (has internal 12k pulldown).
Input-only pins
D0 (GPIO16) has special hardware constraints: it lacks hardware interrupts, PWM and I2C capability. To use Deep Sleep mode, connect D0 to RST so the internal RTC timer can pull RST low to wake the processor.