Hello!
As one of my first projects, I'm trying to establish UART communication between my ESP32 and my PC via USB, specifically having ESP send a string to PC. However, the only thing I'm viewing is strings that are printed, not written in UART's functions. I'm using pyserial to check the COM port, as well as Hercules software. Can somebody help me?
ESP32 communication via USB UART
Re: ESP32 communication via USB UART
The interface attached to the USB port is not registered as an UART. You can send strings using print() or sys.stdout.write(). or sys.stderr.write().
Re: ESP32 communication via USB UART
Thank you! By the way, how can I do it the other way around: send a string from PC to ESP32?
Re: ESP32 communication via USB UART
That depends on your programming environment and operating system. You have to write data to the serial port, which is registered as interface to the ESP32. With Windows, this is a COMx port. With linux , its a /dev/tty_USBx device, with OS X, a /dev/tty_xxxx device. xxxx for varying numbers or names.