I solved the problem with installing the code in esp32, but now another problem has appeared

when the code is executed it sends me hello world 2 times and then a very large number of strange characters

void setup() {
  // put your setup code here, to run once:
    Serial.begin(115200);
}

void loop() {
  // put your main code here, to run repeatedly:
    Serial.println("Hello world!");
}

image

What code would that be ?

here is the code, it should essentially output an infinite "Hello world" value

void setup() {
  // put your setup code here, to run once:
    Serial.begin(115200);
}

void loop() {
  // put your main code here, to run repeatedly:
    Serial.println("Hello world!");
}

if I clean the port monitor, it again gives me strange characters

first thing I would do is be sure the serial monitor is set to 115,200
second thing I would try is to throw a delay into the loop to see if the ESP32 is flooding the serial port, overflowing the serial buffer, and getting out of sync

In your duplicate topic (now deleted) the screenshot shows that the Serial monitor is set to 9600 baud but the code sets the baud rate to 115200


you mean like this?

No. The upload speed is not relevant

The baud rate in Serial.begin() must match the Serial monitor baud rate, bottom right of the SM window

Here is the screenshot from your deleted topic showing that they don't match

image

oh eeeeeeeee
Thank you
it works, I'm 22 years old, and I'm happy like a child

how else interesting can you test this esp32 without connecting anything?

Slow down the printing rate by putting a delay() in loop(). Look at the BlinkWithoutDelay example and use that principle to slow down the printing rate without blocking the loop() function

Print a message each time through loop() and a different one every 5 seconds

Use analogRead() to read the value on a pin and print that to the Serial monitor. The value should change when you touch the pin with a finger

Change the program to print the difference between the current value and the previous one

Print a different message depending on whether the value is greater or smaller than the previous reading and a special message if they are equal

Print the maximum and minimum values in the last 30 seconds

Print the average of the last 10 readings

2 Likes

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