Serial Monitor Not Working On Esp32(SOLVED)

If you know already what the solution is, and aren't willing to listen to anybody who is giving you advice, just stop wasting our time.

It does not work :(.

Please just tell us the exact version number. "Latest" might mean any of multiple different things:

  • Latest stable version: Arduino IDE 1.8.19
  • Latest tester prerelease of Arduino IDE 2.x: 2.0.0-rc6
  • The latest nightly build of either one
  • The latest version from some package manager (e.g., APT, SnapCraft)

You will see the version number printed at the top of the Arduino IDE window. If you don't see it there, select Help > About Arduino IDE (Arduino IDE > About Arduino IDE if you are using macOS).

Please also tell us which operating system you are using because some of the advice provided here is specific to one OS, meaning it will not be usable if you have another OS.

I use windows 10 pro and my ide version is Arduino IDE 1.8.19.

That answers one of my questions. You need to answer both of them.

Look, if you want help, you need to start making more of an effort here. We are the ones trying to provide you with free assistance for your problem, yet we are doing more work here than you are. That is not respectful behavior. Help us to help you. Maybe you think you are saving time with these short vague answers, but I assure you that is not the case.

1 Like

I don't understand 'OS'

What's the other question and what does it mean??

Sorry about that. It is an acronym for "operating system". I normally try to avoid the use of undefined acronyms in my writing but I slipped up this time.

I'll try to keep it in mind while providing support to others in the future.

The other question was which version of the Arduino IDE you are using. I see you have now answered that by editing your previous reply:

I know it has been mentioned already, but maybe not so clearly. Please make sure you have selected "115200" from the baud rate menu near the bottom right corner of the Serial Monitor window.

Please try uploading this sketch to your ESP32 board:

void setup() {
  Serial.begin(115200);
}

void loop() {
  Serial.println("hello");
  delay(1000);
}

Do you see "hello" printed periodically in Serial Monitor with that sketch running on the board?

1 Like

Yes, :wink: I am so happy :smiley: it works. Thank you for all of your guys help especially ptillisch.

And you TinManSA you have been a really helpful person because it felt like reinstalling the ide helped so I have to say thanks :wink: :slight_smile: :smiley: That was kind of a solution.

You are welcome. I'm glad if I was able to be of assistance. Enjoy!

Per

12 posts were split to a new topic: My while loop doesn't let the Serial to print

10 posts were split to a new topic: No Serial Monitor output from Lilygo T-Display S3 3 board

I realize that this is over a month old, but I thought that I'd share my findings.
I've been building projects in Arduino for years now. I just got into ESP32 this week. LOL

I've run into the same Serial.println not printing already. It took me a little while to figure out why it was not printing, but I have it working 100% now.

First, for Arduinos, I do use
while(!Serial);
and that works just fine.
HOWEVER, it did NOT work in ESP32, either of the 2 boards that I have.

I just thought that MAYBE, just maybe, the ESP32s are "too fast" (much faster than arduino boards) so perhaps the serial port doesn't get fully ready to go and goes into some kind of shutdown state or something.

So as a test, I simply put a delay of 1 second (to start with)
delay(1000);
IT WORKED! CONSISTENTLY!
Then I lowered the delay to 500 and it still worked. Then I tried 200 and it was glitchy. Sometimes worked, other times no.

One thing, is that you need to be sure to not over saturate the serial port.
To avoid that, I never have anything going to any serial port at the speed of the loop.

The way I design things, is to have a timer always running in void loop()
I got lazy and started using Neotimer as it just makes life easier for a lazy person.

Then I sometimes only send data to a serial port if the data changes. (mostly talking about LCD displays).

By having a delay between sends it works just fine.

I did a test as well to see if saturating the serial port(s) really is a thing and for me, it was.
I have 2 serial ports enabled. The usual and a 2nd port, Serial2 so that I can send data to my Nextion display.

I set Neotimer to 50 ms (way too fast) and in that loop, I would toggle the built in LED and send 3 changing variables to the Nextion... very fast.

It worked, to my surprise, BUT, when I just now wanted to upload a sketch to find the MAC address of this one ESP32, it wouldn't work! IDE kept complaining that the COM port didn't exist, even though it was there. I couldn't even open the Serial monitor!
Which is odd since THAT serial port was NOT the one being sent to fast!

So I pressed reset a bunch of time, very fast and kept clicking on the Serial Monitor and finally that loaded.
Then, I started the upload of the MAC sketch and as the compiler got to the end, I quickly pressed Reset then held down the Boot button.
This time it worked!

So there's some sort of "saturation" going on there, whether is the UARTs or the CPU, I don't know. I'm too new to the ESP32. But I will be continue learning and doing research!

Anyway, try the delay(1000):
Serial.begin(115200); // use for Serial Monitor
delay(1000);
Serial.println("Hello world!");

And if you must have a constantly running Serial.println going in loop, then for testing, as mentioned by someone else, put a delay there too. Even just try 500 or 250 or 100 even.

Hope that helps

3 Likes

A post was merged into an existing topic: ESP32-CAM does not print anything on Serial Monitor

It is late, but jut incase someone else sees this.
Lillygo is using genuine USB hardware serial ports on the chip. In order to use the USB serial port, under TOOLS/USB CDS on boot must be enabled.
By default it is DISABLED.
What this does is to tell the IDE to switch to using the hardware USB for programming to a serial port after it is uploaded.
This setting WILL fix the problem

5 Likes

3 posts were split to a new topic: First line of output not shown in Serial Monitor

Since I was searching for this issue before I figured out I was having a [Dur-Duh-Dur] moment, I thought I would make this commit in the event someone else is beating their head against the wall for the same issue. It turned out that I was trying to use GPIO1 and GPIO3 for sensors until I realized I was trying to use TXD_0 and RXD_0 via USB Debug while I had already assigned them to I/O.

So, you can not use GPIO1 & GPIO3 if you still want to use USB Debug Monitoring. I know, everybody knows that, but sometimes when you have more than a 1000 Lines of Code these things happen, lol. WebServer, 1000 more lines of code. I did not see it mentioned, so I thought I should.

If it helps you great. If you think well of course moron, then this post was never for you.

2 Likes

THIS was the solution to my problem, I was using GPIO1/3 TX0RX0 for my input. To me, this post made my day, especially after reading through so many many suggestions. Thank you so much @badonj !

1 Like

I couldn´t Serial print on a Wemos D1 Mini ESP32 clone.
Adding a 1000ms delay BEFORE Serial.begin made it work. Thanks BlondieSL!