Serial Communication Quiz
Serial Communication Quiz
Test your knowledge of Serial.begin, print, and reading input. — 6 questions
About the Serial Communication Quiz
Test your knowledge of Serial.begin, print, and reading input. This quiz has 6 multiple-choice questions. Each question has one correct answer, and you see an explanation straight after you answer, so you learn from every question — including the ones you get wrong. There is no time limit and nothing to sign up for; your answers are not stored.
The questions follow the material in the Serial Communication on Arduino guide and the Serial Communication Cheatsheet. Read them first if you want to prepare, or take the quiz cold to find the gaps in what you know.
Questions in this quiz
Preview the questions below. Each answer and its explanation are hidden until you choose to reveal them, so you can still take the quiz above without spoilers.
1. What does Serial.begin(9600) do?
Show answer
Answer: B. Initialises serial communication at 9600 baud
Serial.begin() initialises the serial port at the specified baud rate. The Serial Monitor must be set to the same rate.
2. What is the difference between Serial.print() and Serial.println()?
Show answer
Answer: B. println() adds a newline at the end
println() appends a carriage return and newline after the value, starting the next output on a new line in the Serial Monitor.
3. Why should you check Serial.available() before calling Serial.read()?
Show answer
Answer: B. To avoid reading -1 when the buffer is empty
Serial.read() returns -1 if no data is available. Checking Serial.available() > 0 first ensures there is actual data to read.
4. What does Serial.write(65) send?
Show answer
Answer: B. The ASCII character 'A' (byte value 65)
Serial.write() sends raw bytes. Byte 65 is the ASCII code for 'A'. Compare with Serial.print(65) which sends the characters '6' and '5'.
5. Which function reads a full line of text until the user presses Enter?
Show answer
Answer: C. Serial.readStringUntil('\n')
Serial.readStringUntil() reads characters until it receives the specified terminator ߀” a newline is sent when you press Enter.
6. What baud rate must the Serial Monitor be set to if your sketch calls Serial.begin(115200)?
Show answer
Answer: C. 115200
Both ends of a serial connection must use the same baud rate. Mismatched rates produce garbled output in the Serial Monitor.
How to use this quiz
- Answer every question before reading the explanations below — retrieving an answer from memory is what makes it stick.
- Note the questions you missed and revisit the matching section of the guide or cheatsheet.
- Retake the quiz a day or two later. Spaced repetition is one of the most reliable ways to remember technical details.