One of the nice things about the ESP32 is that pins are not hard wired. So you can use different pins if you like, just like SoftwareSerial. The big difference is that it's not done in software, but the ESP32 rewires the UART to the pins you specify.
On the devboard I use for instance, de default pins used by UART1 are already in use to connect the flash chip. You can specify pins to use instead of the default ones with Serial1.begin() (or whatever name you gave your second serial port). In my case (unusual settings because I'm reading data from a smart electricity meter that uses 7E1, has only TX (so RX on my end) and produces an electrically inverted signal):
Code: Select all
SerialSM.begin(9600, SERIAL_7E1, 12, -1, true);
Hope that helps.