Examples for many serials ports

ebelouet
Posts: 4
Joined: Sun Jan 07, 2018 7:57 pm

Examples for many serials ports

Postby ebelouet » Sun Oct 21, 2018 12:41 pm

Hi,

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

Sincerely
Eric

tommeyers
Posts: 184
Joined: Tue Apr 17, 2018 1:51 pm
Location: Santiago, Dominican Republic

Re: Examples for many serials ports

Postby tommeyers » Sun Oct 21, 2018 3:52 pm

How many do you need?

Tom Meyers
IT Professional, Maker
Santiago, Dominican Republic

ebelouet
Posts: 4
Joined: Sun Jan 07, 2018 7:57 pm

Re: Examples for many serials ports

Postby ebelouet » Mon Oct 22, 2018 5:57 am

HI,

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

Eric

tommeyers
Posts: 184
Joined: Tue Apr 17, 2018 1:51 pm
Location: Santiago, Dominican Republic

Re: Examples for many serials ports

Postby tommeyers » Mon Oct 22, 2018 3:49 pm

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
IT Professional, Maker
Santiago, Dominican Republic

rodmcm
Posts: 65
Joined: Sat Sep 02, 2017 3:31 am

Re: Examples for many serials ports

Postby rodmcm » Mon Dec 24, 2018 8:55 am

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);

Who is online

Users browsing this forum: No registered users and 30 guests