Some versions of the Mega bootloader have a built-in monitor mode for examining memory via the Serial Monitor. It is triggered by sending '!!!'. This causes the bootloader to appear to hang if a sketch contains three or more consecutive exclamation marks.
johnwasser:
Some versions of the Mega bootloader have a built-in monitor mode for examining memory via the Serial Monitor. It is triggered by sending '!!!'. This causes the bootloader to appear to hang if a sketch contains three or more consecutive exclamation marks.
johnwasser, many thanks for your reply!
I had a Serial.println(); instruction with three consecutive exclamation marks... Now it uploads the sketch properly. You really saved my day !