Serial Monitor Speed inconsistent with settings

Hi all,

I’m trying to set the speed of the serial monitor to 115200 and encountering some problems in doing so.

This is my project’s platformio.ini

[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino
lib_deps =
# Using a library name
ESP32 BLE Arduino
monitor_speed = 115200

So, when I execute upload and monitor, speed is set to 115200. However, if I upload THEN I open the serial monitor, it starts at 9600 and have found no way to fix it.

Also, I would like to set the speed to 115200 globally, and not on a per project basis. I have tried through File > Preferences > Settings, but no luck.

Any light to shed on this? Thanks

I can’t reproduce this issue. Could you provide more details?

Hi Ivan, sorry for taking so long to answer. I was unable to reproduce the issue after some adding and removing folders to the Code workspace (for unrelated reasons), maybe I messed up with some setting. Please feel free to close this, if it happens again will provide more details

Hi, I got the same problem with the setting in monitor_speed being ignored. This is a fresh install.
I had 2 env defined in platformio.ini as shown below :
[env:Wemos_D1_Mini]
platform = espressif8266
board = d1_mini
framework = arduino
build_flags = -I src/

[env:Arduino Nano 16MHz]
platform = atmelavr
board = nanoatmega328
framework = arduino
monitor_speed = 57600

I wanted to change to monitor speed only for the Arduino Nano so I set monitor_speed to 57600 just in this env section. The serial monitor kept on starting at 9600pbs.
I found that I had to move monitor_speed = 57600 in the first env section to get the monitor started at the desired speed.
Is this the way it should work ? Thanks

If you just press the “monitor” button, PIO will take the first available environment. Just press the button (“env:Arduino nano 16MHz” → “Monitor”) for the environment you want to work in and it will launch it at the correct baud, as shown here.

Or use pio run -t monitor -e <env> from the CLI. Or use default_envs to modify the default environment so that it doesn’t take the first anymore.

1 Like

That’s it…learning something new every day !
Thanks for your help.