Serial Monitor Displaying part of Void Setup early, then resetting

I run a ECE lab and have students trying to send a very basic Hello World code. Those on Macbook are seeing something on their Serial Monitor that I've not see before--and it seems dependent on when they have their Serial Monitor open.

IF they have the Serial Monitor up (output clear) as they upload the code to their Arduino, the first thing that pops up is "Helo World!"--misspelled and everything--followed by "Hello World!" on the same line of the Serial Monitor.

If they open it AFTER they uploading is done, the serial monitor show "Hel" and then shows "Hello World!".

If they hit the hard reset on their Arduino, it functions normally from that point forward. This is only happening with my students using a Mac...not a Windows OS.

Code is below...again, super basic...never seen it do this before. We're running 1.8.19.

Thoughts?

void setup() {
    Serial.begin(9600);
    Serial.println("Hello world!");
}

void loop() {

}

which arduino? which Mac?
(seems the driver is buffering some input before the Serial line is reset)

if you try this, do you see any difference?

void setup() {
    Serial.begin(9600);
    delay(1000);
    Serial.println(F("Hello world!"));
}

void loop() {}

In answering a problem where setup() was "running twice" on upload I measured how long setup() would run before the connection from Serial Monitor caused it to reset. That answer I got was "between 150 and 180 milliseconds". I have taken to putting a "delay(200);" at the top of setup(), after the Serial.begin().

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