I have 2 UNOs. If I write a sketch, then upload it, one serial monitor says, " Hello World!. The other has several boxes then, Hello World! Why are they different?
LarryD
April 5, 2023, 8:12pm
2
How can you expect help if you supply so little information ?
Maybe the baud rate is wrong on one of them. "Boxes" means the data it's getting isn't an ASCII character. The wrong baud rate is one way to get the bits/bytes "corrupted".
Is the code identical?
Or maybe one is defective or maybe the bootloader is corrupted... Does the Blink Example, or anything else, work on the "bad one"?
If you can upload a sketch (and blink works) you know it can read but maybe it can't write.
The code is identical and I had checked baud rate before I ran it. The blink works. Checked baud rate again, it's good.
Hi @MesaCrash1 . Which version of Arduino IDE are you using (e.g., "2.0.1")? The version is shown on the window title bar and also in the Help > About dialog.
westfw
April 6, 2023, 12:34am
8
MesaCrash1:
I have 2 UNOs. If I write a sketch, then upload it, one serial monitor says, " Hello World!. The other has several boxes then, Hello World! Why are they different?
Serial Monitor can display characters that were buffered before the sketch started, perhaps transmitted at a different speed.
There is a known bug in Arduino IDE that can cause the symptoms you describe @MesaCrash1 :
opened 08:23AM - 24 Mar 22 UTC
topic: code
type: imperfection
topic: CLI
topic: serial monitor
criticality: low
### Describe the problem
The first output printed to Serial Monitor after an … upload is some "garbage" characters.

### To reproduce
#### Equipment
- Arduino board that uses the ATmega16U2 USB chip:
- Arduino Uno
- Arduino Uno Mini
- Arduino Mega
#### Steps
1. Upload a sketch to your board that prints to `Serial`:
```cpp
void setup() {
Serial.begin(9600);
Serial.println("hello world");
}
void loop() {}
```
1. Open the "**Serial Monitor**" view.
🐛 The output starts with some unexpected content:
```text
□□□□□□□□□□□hello world
```
### Expected behavior
Serial monitor output always reflects the data sent by the board.
### Arduino IDE version
2.0.0-rc5-snapshot-4de7737
### Operating system
Windows
### Operating system version
10
### Additional context
The number of `□` in the demonstration matches the number of characters that are printed by the sketch.
---
The spurious output does not occur when the output is triggered by resetting the board, so it is specific to the upload operation.
---
The spurious output still occurs even if you add a delay before the print, so it is not a matter of timing from initialization as is sometimes the cause of corrupted serial output.
---
The issue does not occur when using Arduino IDE 1.x
---
I have only been able to reproduce this issue with the Arduino boards that use an ATmega16U2 USB to serial adapter chip.
I could not reproduce it when using boards with other USB interfaces:
- Native USB (Leonardo, Nano 33 IoT)
- FTDI FT232R (Nano, Pro Mini)
- WCH CH340 (3rd party boards)
---
Originally reported at https://forum.arduino.cc/t/serial-monitor-contains-garbage-after-upload/972312
### Issue checklist
- [X] I searched for previous reports in [the issue tracker](https://github.com/arduino/arduino-ide/issues?q=)
- [X] I verified the problem still occurs when using the latest [nightly build](https://github.com/arduino/arduino-ide#nightly-builds)
- [X] My report contains all necessary details
If you have a GitHub account, you can subscribe to that issue to get notifications of any new developments related to this subject.
I was starting a conversation. Perhaps you have forgotten the protocol:
Welcome to Arduino Forum — thanks for contributing!
Be kind to your fellow community members.
Does your reply improve the conversation?
Constructive criticism is welcome, but criticize ideas , not people.
For more, see our community guidelines . This panel will only appear for your first 5 posts.