Hello, as a Newbie, I didn't work with Serial Monitor before, so I recognize a line of code
Serial.begin(9600);
as setting up the baud rate. Usually it is set to 9600 baud, but would it make any difference if I use another one? Different baud rates between the Arduino and the computer make gibberish start displaying, but I just wanted to know any difference between communication of 9600, 11520, ... .
Use what you like, so long as the rate called for in the code matches. The default 9600 is usually fine.
pon00009:
[...] but I just wanted to know any difference between communication of 9600, 11520, ... .
Let me explain the difference with examples:
1. Example-1
Serial.begin(9600);
Serial.print("OK");
(1) How much time would be required for the above message ("OK") to appear on the Serial Monitor at Bd = 9600?
(a) Every character travels towards Serial Monitor as a 10-bit data frame as per following format of Fig-1 called Asynchronous Frame:

Figure-1: Asynchronous data frame
(b) Bd (Baud Rate) refers to number of bits being transmitted/received in 1-sec time. (Simple definition for the UART Post of ATmega328P.)
So, the travel time of 10-bit (one frame) data is: (1/9600)*10 = 1041 us.
(c) Therefore, the message "OK" will take 2*1041 = 2082 us time to reach at the Serial Monitor.
2. Example-2
Serial.begin(115200); //(11520); Edit
Serial.print("OK");
(1) How much time would be required for the above message ("OK") to appear on the Serial Monitor at Bd = 115200?
(2) At Bd = 115200, the message "OK" will take 2*(1/115200)*10 = 174 us to reach at the Serial Monitor.

1 Like
GolamMostafa:
2. Example-2
Serial.begin(11520);
Serial.print("OK");
**(1)** How much time would be required for the above message ("OK") to appear on the Serial Monitor at Bd = 11520?
That's a pretty unusual rate, and may not be supported by the serial monitor.
Try 115200 instead.
TheMemberFormerlyKnownAsAWOL:
That's a pretty unusual rate, and may not be supported by the serial monitor.
Try 115200 instead.
I blindly followed @OP's post and did that great blunder.
pon00009:
[...] but I just wanted to know any difference between communication of 9600, 11520, ... .
I have corrected my post.