On LUA mode,
- when connecting the output of my sensor to NodeMCU PIN GPIO13 (RXD2): I can see the UART signal applied on this PIN but ESP8266 is not reading it
- when connecting the output of my sensor to NodeMCU PIN GPIO3 (RXD0): I can't see the UART signal on this PIN, the voltage remains high all the time
So my conclusion: in LUA mode, since Serial.swap() is not available AFAIK, should I want to access UART information from my ESP8266, I probably have only one option: disconnect the USB cable from the ESP8266 in RUN mode. However, this would make my life a nightmare when troubleshooting, since I lose of course the printf fonctions...
As a consequence, I switched to Arduino IDE and am now using Serial.swap(). Works like a charm.