Serial Communication Quiz

Serial Communication Quiz

Test your knowledge of Serial.begin, print, and reading input. — 6 questions

Question 1 of 6 Score: 0

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?

  1. Opens the Serial Monitor at 9600 Hz
  2. Initialises serial communication at 9600 baud
  3. Reads 9600 bytes from the serial buffer
  4. Sets pin 9 to high 600 times per second
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()?

  1. print() is faster
  2. println() adds a newline at the end
  3. print() sends raw bytes only
  4. There is no difference
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()?

  1. To set the baud rate first
  2. To avoid reading -1 when the buffer is empty
  3. To flush the output buffer
  4. To enable interrupts
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?

  1. The text '65'
  2. The ASCII character 'A' (byte value 65)
  3. 65 bytes of data
  4. Nothing ߀” 65 is invalid
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?

  1. Serial.read()
  2. Serial.readLine()
  3. Serial.readStringUntil('\n')
  4. Serial.getString()
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)?

  1. 9600
  2. 57600
  3. 115200
  4. Any rate works
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.

Related