Page 1 of 1

Examples for many serials ports

Posted: Sun Oct 21, 2018 12:41 pm
by ebelouet
Hi,

I search a arduino program to use all serials ports in ESP32 ?

Sincerely
Eric

Re: Examples for many serials ports

Posted: Sun Oct 21, 2018 3:52 pm
by tommeyers
How many do you need?

Tom Meyers

Re: Examples for many serials ports

Posted: Mon Oct 22, 2018 5:57 am
by ebelouet
HI,

I would like to use all serials ports with ESP32 module, 3.

Eric

Re: Examples for many serials ports

Posted: Mon Oct 22, 2018 3:49 pm
by tommeyers
I explored that recently. Here is how I quickly tested them: Connected (tx+rx) to (rx+tx) then sent messages between them. The test was < 10 lines of code.

I don't remember exactly but I think those 3 use a UART and one is connected to USB. I also don't remember if there are serial libraries for software serial which would increase the number of serial, maybe.

That is pretty vague sounding, sorry.

Tom Meyers

Re: Examples for many serials ports

Posted: Mon Dec 24, 2018 8:55 am
by rodmcm
There are three hardware based serial ports (0,1,2) on the ESP32 without using hardware serial

Have a look at an IO cross reference for the IO associated with each port

You can use by calls such as this

HardwareSerial Serial1(1);
#define SERIAL1_RXPIN 25
#define SERIAL1_TXPIN 26

Serial1.begin(57600, SERIAL_8N1, SERIAL1_RXPIN, SERIAL1_TXPIN);
Serial1.setRxBufferSize(1024);