ESP32 Serial ports

Good morning everyone,
I have a question, I'm a bit confused because I don't know what pins I should look for in esp32-s3-wroom-1 for my Serial0, Serial1 and Serial2 ports? Could someone give me some advice?

I set Serial1 but unfortunately there is no response on pins 17,18 ;(
Thank you very much in advance for your help

The ESP32 can be configured to use nearly any pin for serial communication.

used the following code on a ESP32-S3 DevkitC-1 Serial1 on pins 17 and 18 worked OK

// ESP32-S3 DevkitC-1  Serial1 test - for loopback test connect pin GPIO17 U1TXD to pin GPIO18 U1RXD"
// ss https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/_images/ESP32-S3_DevKitC-1_pinlayout_v1.1.jpg

#define RXD1 18
#define TXD1 17

void setup() {
  // initialize both serial ports:
  Serial.begin(115200);
  Serial1.begin(115200, SERIAL_8N1, RXD1, TXD1);
  Serial.println();
  Serial.println("\n\nESP32-S3 DevkitC-1 serial1  test pin GPIO17 U1TXD pin GPIO18 U1RXD");
  Serial.write("   for loopback test connect pin GPIO17 U1TXD to pin GPIO18 U1RXD\n");
}

void loop() {
  // read from port 1, send to port 0:
  if (Serial1.available()) {
    int inByte = Serial1.read();
    Serial.write(inByte);
  }

  // read from port 0, send to port 1:
  if (Serial.available()) {
    int inByte = Serial.read();
    //Serial.write(inByte);
    Serial1.write(inByte);
  }
}

connect pin 17 to pin 18 forms a loopback test - characters entered on serial monitor keyboard are transmited over Serial1 and the received characters displayed

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