1
votes

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?

1
i try DEC but doesnt workAli Ensar KARAGÖZOĞLU
Do you have anything connected to pins TX and RX (aka pin 0 and 1)?gre_gor
Yes I did not write the program if it did not existAli Ensar KARAGÖZOĞLU

1 Answers

3
votes

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
}