Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 653
Defozo Avatar asked Nov 11 '17 16:11

Defozo


People also ask

How do I change baud rate in PlatformIO serial monitor?

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.

How do I change the baud rate in VSCode?

To start the serial monitor in Visual Studio Code go to the command palate Ctrl + Shift + P and enter “serial” then select Focus on Serial Monitor View. The serial monitor enumerates the available ports in the Port dop down box. You can set the baud rate and line ending mode in their own drop down boxes.

What baud rate should the serial monitor be set to?

The default 9600 is usually fine. Nick_Pyner: Use what you like, so long as the rate called for in the code matches. The default 9600 is usually fine.


2 Answers

You need to add the option monitor_baud = 115200 for your target in platformio.ini

like image 132
a.mark.pierce Avatar answered Sep 28 '22 10:09

a.mark.pierce


i just added:

monitor_speed = 115200

to platformio.ini file and it works

like image 39
Roshan Avatar answered Sep 28 '22 12:09

Roshan