Hi,
The ESP32-C3 has 2 hardware uart.
How do I use the 2nd uart?
I've tried
// ESP32 C3 SERIAL1 (second UART)
HardwareSerial mySerial1(1);
int rxPin=4;
int txPin=5;
void setup()
{
Serial.begin(115200);
pinMode(txPin,OUTPUT);
pinMode(rxPin,INPUT);
mySerial1.begin(115200, SERIAL_8N1, rxPin, txPin);
}
void loop()
{
mySerial1.println("AT?");
//delay(100);
if (mySerial1.available())
{ // If anything comes in Serial1 (pins 4 & 5)
while (mySerial1.available())
Serial.write(mySerial1.read()); // read it and send it out Serial (USB)
}
}
but doesn't seem to get response from the esp32...
using the 2nd uart or uart1 on esp32-c3
Re: using the 2nd uart or uart1 on esp32-c3
You can check this for some clues: viewtopic.php?t=22682
Who is online
Users browsing this forum: Baidu [Spider] and 124 guests