Multiple UART TX only ports on ESP (2866 or 32)

I'm thinking to a new project where I will need from 2 up to 4 serial output (TX only) @ 31250bps.
On Arduino Docs I read about the SoftwareSerial which could be the best solution since the HW is not yet selected (and I can not have 4 ports anyway). Possibly it will be a ESP-WROOM-32 or ESP32-WROVER.

In the DOCs it states:

SoftwareSerial(rxPin, txPin, inverse_logic)

My question is: since I do not need (use) the rxPin) should I assign a pin anyway (leaving it unused) or define the same pin for every declaration loosing only one phisical pin, or defining rxPin = 0 or...
Thanks

I have seen 3 serials implemented:
ESP32 โ€“ Programming Three Serial Ports (UARTs) Using the Arduino IDE - Copperhill (copperhilltech.com)

First, you should use:
EspSoftwareSerial - Arduino Reference

Review caveats here:
GitHub - plerup/espsoftwareserial: Implementation of the Arduino software serial for ESP8266

Do you need the ESP for some other reason? If not the Arduino MEGA has 4 hardware serial ports.

If you don't want a Mega then a single baudrate interrupt can be used to shift out data on any number of channels.

And Teensy 4.0 has 7.

There is this. I dont know whether it works on an ESP.

Thanks for your suggestions, but I'd like to simplify the matter.
I'll appreciate an answer to the main point which is what to do with the rxPin:

The SoftwareSerial is not going to work on a ESp32.

An answer to the question to me lies in using the ESP32's serial API instead of using the ESP32's Arduino Core. Using the ESP32's UART API, only one direction needs be used, only a Rx or a Tx pin, the non used pin is a NULL.

https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/peripherals/uart.html

The ESP32's UART API works under the Arduino IDE. Good luck.

1 Like

This is a good idea; I saw this document and possibly it could sastisfy my need; unfortunately it is quite difficult fo my knowledge, particularly for the driver and interrupts parts.
I will see, thanks

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