Terminal does not show feedback from module

Hi,

I do not get the feedback from my module in the terminal window.

I’m working on Windows 10 version 2004.

When I open the Arduino IDE serial monitor, I do get the feedback expected. The Arduino IDE was initially closed - it was only opened after I could not see the feedback.

Code:

include <Arduino.h>

#include "..\include\ESP32_PINDEVS.h"

#include "..\include\Var_Defs.h"

void setup()

{

  // put your setup code here, to run once:

  // initialize the LED digital pin as an output.

  pinMode(PIN_LED, OUTPUT);

  pinMode(TRIGGER_PIN, INPUT_PULLUP);

  pinMode(TRIGGER_PIN2, INPUT_PULLUP);

  Serial.begin(115200);

  while (!Serial);

  delay(1000);

  //Serial.print("\nStarting ConfigOnSwitch using " + String(FS_Name));

  Serial.println(" on " + String(ARDUINO_BOARD));

  delay(5000);

  Serial.setDebugOutput(true);

}

void loop()

{

  Serial.print(PIN_LED);

Serial.println("in loop");

delay(1000);

digitalWrite(PIN_LED, LED_ON);

delay(200);

digitalWrite(PIN_LED, LED_OFF);

}

Platformio.ini:

[env:esp32dev]

platform = espressif32

board = esp32dev

framework = arduino

upload_port = COM5

monitor_port = COM5

monitor_speed = 115200

monitor_flags = --echo

Serial monitor on Arduino IDE

If you are already pressing “Upload and Monitor” in the project tasks window, it could be that the monitor opens too later after firmware has already been flashed. Check your monitor open delay in the VSCOde extension settings as Any way to delay opening serial port monitor? - #2 by pfeerick.

The output does appear if you manually push the reset button of the board, right?

The output appears in the Arduino monitor right away without any further action

Doing the reset on the MCU after flashing does not have any impact on the issue in VSCode/PlatformIO

Meaning that there is no output?

I clicked on this icon

image

And problem seems to be solved

Arduino Monitor must be closed for this to work

THANKS FOR THE RESPONSE AND ASSISTANCE!

2 Likes

Ah okay you had the serial monitor in Arduino IDE open. Yes, only one program can bind a serial device.

No, the Arduino IDE & monitor were only started after the problem occured to check if I could see the output from the MCU.

Very relived it was a minor thing to correct :smile:

Ah okay, then you were indeed just pressing upload and not the upload and monitor task (PlatformIO IDE for VSCode — PlatformIO latest documentation) or the serial monitor open button. Now it’s clear.