Hi there,
On ESP32 devices (including the ESP32-C3), the standard Arduino SoftwareSerial library isn’t well supported. The ESP32 (and ESP32-C3) has multiple hardware UARTs, which are far more reliable and efficient than SoftwareSerial. If you’re using SoftwareSerial on your Xiao ESP32-C3 for a GPS module on pins 9 & 10 (and another device on pins 6 & 7), you might run into timing and compatibility issues that prevent it from working correctly.
What You Can Do
- Use Hardware Serial Instead:
The ESP32-C3 provides multiple hardware UARTs. Instead of relying on SoftwareSerial, you can use one of these hardware UARTs (for example, UART1) to handle your GPS data. This is both more reliable and easier to configure. - Configure the Correct Pins:
You can assign the desired RX/TX pins for the hardware UART in your code. For example, if you want to use pins 9 and 10 for the GPS, you can create a HardwareSerial instance (say,Serial1
) that uses these pins. - Multiple Serial Ports:
If you have another device on pins 6 & 7, you can similarly assign it to another hardware UART (for example, UART2, if available) or use SoftwareSerial only if absolutely necessary (but hardware is preferred).
HTH
GL PJ