ESP8266 flashing with USB while using UART2

Hello,

I am using and NodeMCU ESP8266 and I want to use UART2 to communicate with a sensor.
I understand, that UART2 is UART0 on different Pins and can be accessed via SERIAL. SWAP(). However I am not sure if i can use USB to flash the Controller once the swap was executed.
So my question is: is it possible? for example by pressing the boot button?

I know that i could swap back but i don't want to implement this in my code.

The method is called Serial.swap(), SERIAL.SWAP() will not compile.

As the ESP8266 is reset before the boot loader starts all UART configurations are reset to the default.

Yes ! (if this was not made clear by @pylon already)

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.