If the serial monitor of platformio in vscode doesnt output anything, maybe its because some ESP32 boards have a mechanism that connects RTS/DTR to the EN/GPIO0 lines, and if the RTS/DTR are driven the wrong way when the serial monitor opens, it might shut down the ESP32.
We can try adding each of follow blocks to the platformio.ini and retry opening the serial monitor, until it works.
If one doesn’t make a difference, delete it and try again withthe next one.
1.)
monitor_rts = 0
monitor_dtr = 0
2.)
monitor_rts = 0
monitor_dtr = 1
3.)
monitor_rts = 1
monitor_dtr = 0
4.)
monitor_rts = 1
monitor_dtr = 1
https://docs.platformio.org/en/latest/projectconf/section_env_monitor.html
For me, with the ESP32-CAM (aithinker clone) with MB (The mother board allow to program directly from usb cable), the one that works was:
monitor_rts = 0
monitor_dtr = 0
platformio.ini file sample for the project
[env:esp32cam] platform = espressif32 board = esp32cam framework = arduino monitor_speed = 115200 lib_deps = geeksville/Micro-RTSP@^0.1.6 monitor_rts = 0 monitor_dtr = 0
There are some usefull comands to check the serial comunications on platformio, the following are a sample;
pio device monitor –encoding hexlify
pio device monitor –filter debug
pio device –help
pio device COMMAND –help
Info source
https://community.platformio.org/t/noob-stuck-on-esp32-cam-mb-with-pio-vscode/19117/4