Coming from Arduino, do I use Terminal or Serial monitor for 'Serial.print' output?

Hi, as mentioned when using Arduino and sending … Serial.println("Hello, World!");

This would be displayed on the Serial Monitor window.

I did the same using Platform.IO and expected the output to be on the Platformio Serial monitor window, but when I open this, nothing is shown ?

But the ‘Hello, World!’ is actually shown in the terminal window, is this how it should work ?

Thanks Gaz

I am using CLion with Platform.io and everything related to Serial.print is logged into the Serial Monitor for me there.
Maybe you open the Serial Monitor after the Hello World is printed? If possible, try using “Upload and Monitor” so the whole process is immediately logged

We can’t say anything unless you show both code and platformio.ini.

It is an extremely common mistake for e.g. certain ESP32 boards to select the wrong board / settings, and then the Serial output suddenly goes nowhere (USB CDC vs UART).

I am using a ESP32-C3 Mini board clone, thanks

[env:esp32-c3-devkitm-1]
platform = espressif32
board = esp32-c3-devkitm-1
framework = arduino
build_flags =
-D ARDUINO_USB_MODE=1
-D ARDUINO_USB_CDC_ON_BOOT=1

#include <Arduino.h>

void setup() {
Serial.begin(115200); // Initialize serial communication
}
void loop() {
Serial.println(“Hello, World!”); // Print “Hello, World!” to the Serial Monitor
delay(1000); // Wait for 1 second
}

That doesn’t look bad.

And you made sure to press the “Upload” button first?

Did you try selecting different available serial ports in the bottom of the VSCode taskbar?

Hi a short GIF to show you results

Peek 2024-12-04 07-33

“Serial Monitor” is not part of PlatformIO.
This is a separted Plugin for VS-Code.

If you already use the builtin monitor, the COM port is blocked and cannot used by another terminal program like “Serial Monitor” plugin.

If you want to use “Serial Monitor”:
Close all Terminal sessions
Open a new Terminal session
Go to the “Serial Monitor” tab

maxgerhardt Just after sending that GIF I tried as you mentioned …

Did you try selecting different available serial ports in the bottom of the VSCode taskbar?

it wasn’t set as ACM0, so i corrected that.

I then did

And you made sure to press the “Upload” button first?

And now the Serial Monitor does indeed show Hello world
And ideas why this change works ?