Platformio Serial Monitor trouble with esp32 cam

I have recently shifted from using the Arduino IDE to using Platformio in VS Code. Its nice, but I am having significant trouble with the serial monitor.

I have an esp32 cam board and am connecting through a separate micro USB to serial board.

Whenever I try to establish a serial connection to the board, the platformio serial monitor either returns gibberish, or null. In addition, the code I have loaded should print repeatedly, but the serial monitor only outputs a small amount of scrambled text.

The weird thing is that when I use the serial monitor built in to the arduino IDE, the output becomes as expected. I have also tried putty, but it does not seem to work either.

Test script running on the board:
main cpp file

platformio.ini file
platformio ini file

platformio serial monitor output at different baud rates (though 115200 should be the correct option):

arduino ide serial monitor output:

Can you add the instructions to set DTR and RTS inactive into the platformio.ini per Noob stuck on ESP32-CAM+MB with PIO/vscode - #8 by ddtech?

1 Like

So I tried it again with a different esp32 cam board, and I believe it may be an issue with psram? The board I was originally using appears to not have psram (it is averaging about half of the fps that it should in the caamerawebserver arduino example), though it should have psram. Maybe a faulty board.

I also tried your suggestion after. and changing these values seems to have done nothing? I did not rebuild and reupload between changing these values. I am so confused with this whole process.

This doesn’t look like PlatformIO’s serial monior at all but some plugin. Are you sure you’re starting it via project tasks → Monitor? Only there do the platformio.ini options have any effect.

Damn. Okay, so this is the serial monitor extension for VSCode by microsoft. I assume I downloaded it at some point and forgot about it. When you open the platformio serial monitor, it gives you a prompt in the terminal. With the issue I was having, it did not output anything in the terminal, and the previously downloaded serial monitor is right next to the terminal. I conflated the two.

Sorry for all of the confusion, I am new to all of this xD
image

Does it display correctly now in PlatformIO’s serial monitor the same as it does in the Arduino IDE? If not, have you tried all 4 combinations of dtr and rts as referenced in the linked post?

Everything is working fine now! It seemed to either be a problem with the esp board or the usb to serial board.

The platformio monitor works now! It previously did not display anything, but now it works as expected.

After everything started working, I did try changing the dtr and rts values, but they did not affect other serial monitors. I do not know how they affect the platformio monitor as I did not test that.

In the end, I don’t really know what solved it :frowning:

Thanks so much for your help though!

1 Like