There are a limitted number of pins available and some affect the boot behaviour of the system. RX,TX are needed for USB connections Image from randomnerdtutorials:
Pin # | Name | Usual Function | Usually Low | Pulled | PWM | i2c | interrupt | High at Boot | Boot if pulled low/high |
---|---|---|---|---|---|---|---|---|---|
16 | D0 | Wake | yes | high,optional | no | no | no | yes | |
5 | D1 | SCL | high,optional | yes | yes | yes | |||
4 | D2 | SDA | high,optional | yes | yes | yes | |||
0 | D3 | Boot / Flash | high,normal | yes | yes | yes | low fails | ||
2 | D4 | onboard LED | high,at boot | yes | yes | yes | yes | low fails | |
14 | D5 | SCK | high,optional | yes | yes | yes | |||
12 | D6 | MISO | high,optional | yes | yes | yes | |||
13 | D7 | MOSI | high,optional | yes | yes | yes | |||
15 | D8 | SS | yes | low,allways | yes | yes | yes | yes | high fails |
3 | RX | USB | high,optional | yes | yes | yes | yes | ||
1 | TX | USB | high,optional | yes | yes | yes | yes | low fails | |
A0 | ADC0 0-1V | no | no | no |
When you attach an external device and it pulls a pin high or low when powered on, make sure this does not conflict with boot behaviour of ESP8266.