Menu
CoddyTech

Hello, Serial Monitor

Part of the First Circuits section of Coddy's Arduino journey. Lesson 7 of 22.

The board can send text to your computer through its USB cable. The Serial monitor, under the board, shows what it sends.

Start the connection once, in setup():

Serial.begin(9600);

9600 is the speed in bits a second, called the baud rate. On a real board, the Serial monitor must be set to the same speed, or the text comes out scrambled. 9600 is the usual choice.

Then send a line of text:

Serial.println("Hi there");

Text goes between double quotes ". A piece of text in quotes is called a string. println means "print line": it sends the text, then moves to a new line.

challenge icon

Challenge

Easy

Greet the Serial monitor once:

  • in setup(), start Serial at 9600
  • then print Hello, board!
  • leave loop() empty

Press Run and watch the Serial monitor, then Check.

Try it yourself

void setup() {
  // start Serial, then print the greeting
}

void loop() {
}
quiz iconTest yourself

This lesson includes a short quiz. Start the lesson to answer it and track your progress.

All lessons in First Circuits

Practice on your own: Arduino playground