Question regarding UART communication with ESP32 dev board

Welcome to the forum

Please post your code here, using code tags when you do

What is the purpose of the 1K resistor ?