Page 1 of 1

Delay in reading millis by serial monitor

Posted: Wed Aug 07, 2024 9:28 pm
by ESP_DEVKIT
I'm using "DOIT ESP32 DEVKIT V1".When applied the below code, there are about ten milliseconds between readings. It is unknown what the controller is doing during this time.
#Code:

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

}

void loop() {

Serial.println(millis());

}

#Sambel of result in Serial monitor:

56469
56469
56469
56469
56469
56469
56469
56469
56469
56469
56469
56469
56479
56479
56480
56480
56480
56480
56480
56480

Re: Delay in reading millis by serial monitor

Posted: Thu Aug 08, 2024 1:07 am
by ESP_Sprite
It's sending the millis to your serial monitor. That takes time as well. It doesn't for the first bunch of readings as there is a buffer that slowly fills up.