How to send commands on UART 1 in esp32 using hardware serial.

Hi guys,

I was looking for a command that can behave the same way as we type and send the commands from the box in the serial monitor. Just because I am using hardware serial for ESP32 (UART 1) I don't know how we can send command same way we do on UART 0 with serial monitor as stated above. I tried using "UART1.write(command)" but the module connected on UART1 didn't received any command. can anyone tell me correct way of sending commands on the UART?

Thanks in advance!

receive the things being typed on the serial monitor and retransmit them over Serial1.

Have you tried Serial1.begin(baudrate); Serial1.write(command);?

You need a TTL to USB connector to connect UART1 to the computer and then open the IDE monitor on that new COM port. See this project for a suitable TTL to USB cable.
Remember to connect TX - RX and RX - TX and to connect the GND cable.

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