Arduino IDE 2.3.4 Serial problem

Hello,

i am encountring a problem with the serial.
I apploaded a simple code to the ESP32S Dev Kit:

#include "Arduino.h"

void setup() {
  // put your setup code here, to run once:
  Serial.begin(115200);
  while(!Serial);
  
  pinMode(1, OUTPUT);
  Serial.println("Serial is working");

}

void loop() {
  // put your main code here, to run repeatedly:
  Serial.println("New Line is written!");
  digitalWrite(1, HIGH);
  delay(2500);
  digitalWrite(1, LOW);
  delay(2500);

}

Pin 1 is being written HIGH and LOW.
The problem is that i am not getting any output on the serial.
What can be the reason?

Your link shows a ESP32-S3. If you selected that (or similar) in the IDE, you will have the option to enable USB CDC on boot; give that a try.

This option however is not available for every ESP32 based board (e.g. for the DOIT ESP32 DEVKIT V1).

Note
I'm absolutely not familiar with ESP32 based boards. Are you sure that it's safe to use pin 1; tt might be used for serial communication.

Thank you for the reply.
I have tried with out the PIN 1, no response.
I will try your suggession and hope it will work.

First check the baud rate on your serial monitor, and then restart the application.
Also try removing the cable and plugging it in.
Try removing while(!Serial);

Does the sketch work with an older esp32 like the DOIT?

Try a delay(1000) after the Serial.begin. I've found that needed on the faster boards to get it working. Don't know why, just is.

Thank you all for the repllies,

the problem was within the settings.
I have changed the settings and now i get out the serial messages.

2 Likes

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.