1

I have 3 devices(GPS-Rx only, tft display-TxRx and a motor driver-Rx only) that connect only using uart. 2 of which only Tx, while one another has both Tx and Rx. I am using uart 0, for tx-rx peripheral. Flash mode and peripheral usage with device are separated with a push switch. I also have a micro sd card requirement, so pins of uart1 has to be changed from spi pins. I am using esp-idf and I am trying to use uart_set_pin. Now I have 2 questions,

  1. How do I set no pin for Tx? Setting "UART_PIN_NO_CHANGE" would set it only to default Tx pin.
  2. Can I use GPIO 16 and 17 for Rx pins of uart1 and uart2 respectively?
Balaji S
  • 148
  • 10
  • there is a SoftwareSerial library for Arduino on esp32 – Juraj Aug 31 '22 at 05:32
  • Is there a way to workout with idf? Our project is bound to idf as it gives lot of configurable options. – Balaji S Aug 31 '22 at 07:47
  • 1
    the esp32 Arduino is based on IDF so the internals of the library have to by compatible with IDF. https://github.com/plerup/espsoftwareserial – Juraj Aug 31 '22 at 09:13
  • :). I tested it. I did the following 1. Set Tx of uart1 and uart2 to UART_PIN_NO_CHANGE; 2. assigning the pin gpio 17 to Rx of uart1. 3. assign the pin gpio 16. Ran echo uart on uart 0 to test bidirectional test. Receive different texts over uart 1 and uart 2. It worked. – Balaji S Aug 31 '22 at 10:40

0 Answers0