Serial.println("Stoped sending !!!") --> stops a script from uploadding

Discovered a really unexpected behavior when uploading a script to a ARDUINO MEGA 2560. when the script contains the following instruction :
Serial.println("Stoped sending !!!"); --> KO
the script won't finish uploading. but when I remove one of the ! it works
Serial.println("Stoped sending !!"); --> OK

does "!!!" actually is a "special code" for the ARDUINO receiving program (Boot Loader) ?

Weird anyway :o

PALYGAP:
does "!!!" actually is a "special code" for the ARDUINO receiving program (Boot Loader) ?

Yes, that's correct but only for the old version of the Mega bootloader. They have removed that "feature" a while ago because it was causing nothing but troubles but old boards still have the old bootloader or some of the clone manufacturers still put old bootloaders on their boards. If you burn bootloader to your Mega with any recent version of the Arduino IDE that issue will be fixed.

The funny thing is if you enable verbose output during upload you will see the bootloader says "BOOTLOADER HUH?" when it encounters !!!.

Funny "feature" indeed. I'll have to stick to 1 or 2 exclamation marks (or burn a new bootloader). What a shame I like to put 3 !
My MEGA board was accually bought about 4 to 5 years ago. That explains the old bootloader.

Thanks for the quick answer :slight_smile:

pert:
They have removed that "feature" a while ago because it was causing nothing but troubles

Indeed. That got me pretty puzzled for while !!!

PALYGAP:
!!!

BOOTLOADER HUH?