14

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.

Defozo
  • 2,946
  • 6
  • 32
  • 51
  • Might be using windows default serial port settings? this can be changed under device manager and properties of the serial port.. – Mr Zach Nov 11 '17 at 16:51
  • I just tried changing that under device manager, unfortunately, without success. Serial monitor started with 9600 baud rate despite the change :( – Defozo Nov 11 '17 at 16:54

6 Answers6

35

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

a.mark.pierce
  • 366
  • 3
  • 3
  • 1
    Works like a charm! – Defozo Jan 05 '18 at 15:53
  • 3
    Thank you very mouch! Only as a clarification, and as the same Platformio warns: `Warning! monitor_baud option is deprecated and will be removed in the next release! Please use monitor_speed instead.` – AndreaT Jun 23 '18 at 10:32
  • 3
    Hm. Wont work in my case: always outputs: `platformio device monitor --baud 9600`. I tried: `monitor_baud = 115200` , `monitor_speed = 115200` as well as `speed = 115200` – Jan Feb 12 '19 at 19:16
  • 2
    for 50 years or more baud has been used but now we need to deprecate it. change for the sake of it! or do todays coders not care about history at all? – nimbusgb Apr 30 '19 at 06:37
18

I just added:

monitor_speed = 115200

to platformio.ini file and it works

https://docs.platformio.org/en/stable/projectconf/section_env_monitor.html#monitor-speed

Freddy Mcloughlan
  • 4,129
  • 1
  • 13
  • 29
Roshan
  • 181
  • 1
  • 2
3

I also had some issues with Serial Monitor on PlatformIO.

In order to get mine working, I had to specify: monitor_rts = 0

The full config (platformio.ini):

[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino
monitor_speed = 115200
monitor_rts = 0

The full reference for monitor options is here.

Craig D
  • 351
  • 2
  • 7
0

monitor_speed = 115200 must be under [env]

M.Girard
  • 11
  • 1
0

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.

Jeremy Caney
  • 7,102
  • 69
  • 48
  • 77
Kaloyan
  • 1
  • 1
  • 2
0

you can open the monitor using following command

    pio device monitor --baud 115200