How to change default baud rate of serial monitor in VSCode with PlatformIO?

Viewed 26762

I have VSCode and PlatformIO plugin. When I start serial monitor it always starts with 9600 baud rate. I'd like to change that, so it always starts with 115200.

I can change the baud rate of already running serial monitor by pressing CTRL+T, b, 115200, enter but I don't want to do this every time I start my serial monitor.

I can't find that setting anywhere. I tried adding a line speed = 115200 to platformio.ini but that didn't change anything.

5 Answers

i just added:

monitor_speed = 115200

to platformio.ini file and it works

monitor_speed = 115200 must be under [env]

I have opened two projects in the platformio. If you continue to get a default baud rate of 9600 in platformio, even though you set monitor_speed=115200 in platform.ini file, check the button "Switch PlatformIO Project Environment" next to the button "Serial Monitor" in Visual Studio Code to ensure you're on the right project. This will save you a lot of headaches.

you can open the monitor using following command

    pio device monitor --baud 115200
Related