1

I have a problem with my brand new Arduino, it seems that no matter what I print with

Serial.println()

be it numbers, strings or anything else, I get garbage on the Arduino serial monitor:

enter image description here

Not even the simplest hello world program works.

Could you help me identify the problem and solve it?

10

1 Answer 1

4

I found the solution :)
I wrote a test program and found a working baud-rate at 600.

enter image description here

My test program:

long baudrates[] = {600,1200,2400,4800,9600,14400,19200,28800,38400,56000,57600,115200,128000,256000};
unsigned char baudcounter = 0;
// the setup routine runs once when you press reset:
void setup() {
 // initialize serial communication
 Serial.begin(baudrates[baudcounter]);
}
// the loop routine runs over and over again forever:
void loop() {
 Serial.println();
 Serial.println(baudrates[baudcounter]);
 Serial.println(" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~");
 Serial.println();
 baudcounter++;
 baudcounter %= sizeof(baudrates)/sizeof(long);
 delay(1000); // delay 
 Serial.begin(baudrates[baudcounter]); // switch baudrate
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.