Using all the three UARTS of ESP32


#1

How do i configure the UART1 and UART2 to use them in my project?


#2

You could have a look at the documentation for the Streams python module.
you could intialize each UART instance and use it simultaneously
https://docs.zerynth.com/latest/official/core.zerynth.stdlib/docs/official_core.zerynth.stdlib_streams.html

this example might be useful:
https://docs.zerynth.com/latest/official/core.zerynth.stdlib/examples/examples.html#core-zerynth-stdlib-serial-port-read-write-basics


#3

I tried using it displays an error on the console. Is there any example where Serial2 and Serial0 are used simultaneously?


#4

hi @Harjas_Singh
We would work to provide an example of two simultaneous UARTs working together in the Docs.
In the mean time, could you tell me which micro-controller you use?
Could you also post the code and the console result.


#5

I am using the esp32 dev module. Its resolved now. The issue was a hardware one. For some reason the serial connection has to be straight between an arduino and ESP32(Serial2). The connection needs to be as shown below and only then will it work.
Rx-Rx
Tx-Tx
Gnd-Gnd