I have an ESP32-S3 board and I can not get a second serial UART to work. The main UART0 on USB is fine but when I define a second serial UART and specify the GPIO pins, it does not work.
The test code looks like this...
#include "Arduino.h"
//---[ VARIABLE DEFINITIONS ]----------------------------
int x = 0;
int y = 0;
int i = 0;
int loopcount = 0;
//---[ SETUP ]-------------------------------------------
void setup() {
Serial.begin(115200);
Serial1.begin(9600, SERIAL_8N1, 18, 17); // Speed, Mode, Rx pin, Tx pin
Serial2.begin(9600, SERIAL_8N1, 10, 11); // Speed, Mode, Rx pin, Tx pin
//Serial1.begin(9600,SERIAL_8N1,dcn_in_pin,dcn_out_pin);
pinMode(17,OUTPUT);
pinMode(18,INPUT);
pinMode(11,OUTPUT);
pinMode(10,INPUT);
pinMode(7,OUTPUT);
}
//---[ MAIN PROGRAM LOOP ]--------------------------------
void loop() {
loopcount++;
//----------------------------------
Serial.println("--------------------------------------");
Serial.println("Hello SERIAL from ESP32-S3 Pass " + String(loopcount));
Serial1.println("Hello SERIAL1 from ESP32-S3 Pass " + String(loopcount));
Serial2.println("Hello SERIAL2 from ESP32-S3 Pass " + String(loopcount));
digitalWrite(7,HIGH);
delay(1000);
//----------------------------------
digitalWrite(7,LOW);
delay(1000);
}
Has anyone gotten a second UART to work on the ESP32-S3?
Thanks
George
Sadly, no joy. Thanks for the suggestion. I have to think someone out there has tried to use a second serial port on an ESP32-S3 with the Arduino IDE.
All suggestions are welcome.
Thanks. I read through that before I posted my problem.
I just finally figured it out. Actually a friend did. He said to try commenting out the pin direction definitions. That worked.
I am pretty sure I defined the UART input or output direction on other projects but in this case, eliminating the pinMode commands on the UART pins made it work.
Go figure !