1
votes

i want to code a simple Hello World code in Arduino to show it on its system monitor, my code is:

void setup()                    // run once, when the sketch starts
{
  Serial.begin(9600);           // set up Serial library at 9600 bps

  Serial.println("Hello world!");  // prints hello with ending line break 
}

void loop()                       // run over and over again
{
                                  // do nothing!
}

but when i run this code, i get This Image characters on the system monitor.Also, i change the Serial.begin() from 9600 to other things but it does not work!How can i fix the problem?

2

2 Answers

1
votes

Check your BAUD Rate on the Serial Monitor. Make sure its 9600, as you told it should be in your code:

Serial.begin(9600);   

In the bottom of the Serial Monitor, there is a drop down to select the baud rate:

Serial Monitor

0
votes

Your linked < This Image > shows a lot of garbage.

Wrong baud rate would rarely produce that much (mow many resets are seen there?

What type of arduino do you use?

Can you assure SerialMonitor in the Arduino IDE is connected to Serial on your Arduino?