Corrupted serial output with esp32doit-devkit-v1

I have a simple program:

#include <Arduino.h>

void setup() {

void loop() {

I selected DOIT ESP32 DEVKIT V1 board in new project wizard. Generated program works fine on MINI D1 ESP32 board (D1 Mini ESP32 ESP 32 WiFi + Bluetooth Internet der Dinge Entwicklung Board basierend ESP8266 Voll Funktions| | - AliExpress) with SIL2104 USB chip. Unfortunately, it produces garbage on DOIT ESP32 DEVKIT V1 board (Neue ESP32 Entwicklung Bord CH9102X WiFi + Bluetooth Ultra Low Power Verbrauch Dual Core WIFI Entwicklung Bord Eletronicos Kits| | - AliExpress) with CH9102X USB chip. I tried different baud rates in Serial.begin(2400) and monitor_speed = 2400 with the same result:


What could be the reason? Should I call Serial.begin() with non-standard pin numbers? BTW, there are at least four DOIT ESP32 DEVKIT V1 board selections in new project wizard. Are they the same?

I found a solution. Not perfect, because it starts with some garbage, but it works fine afterwards:


I added this to platformio.ini:

monitor_rts = 0
monitor_dtr = 0

I recall finding it in one of the posts on this forum, but I don’t have a link to it. Can someone provide a link to explanation why this is necessary for my board?

BTW, adding these directives for boards, which work fine without them, e.g. MINI D1 ESP32 or ESP32-CAM, produces the same garbled characters at the beginning, but the rest is fine.

Well on ESP32 the first few output lines are from the bootloader that spews stuffs out at a fixed 115200 baud. Opening the serial monitor at 2400 baud will cause that data to display as garbled data. You will very likely see that you have no problems with Serial.begin(115200); and monitor_speed = 115200.

Per ESP32 How to turn off automatic log of system output - ESP32 Forum, you can connect or pull-down GPIO15 (like 10k ohm) to GND to prevent this bootloader output.

1 Like

Thanks, it works as advertised. :grinning: