Esp8266 no serial prints / connecting to WiFi and MQTT Broker problem

You can use GPIO13 and 15 as alternate hwSerial pins, but the USB port is connected to 3 & 1.
You can use any pin you like for swSerial.
If you want to use hwSerial pins 13 & 15 but that is probably not what you want to do.

Serial.swap() 

swaps the hwSerial pins from 3 & 1 to 15 & 13 and vice versa.
I think you should just use swSerial on any 2 pins except 3 & 1

1 Like