0Pricing
Arduino & IoT Academy · Lesson

Serial.print vs println

Send labeled values to the Serial Monitor.

Serial.print vs println is a free Arduino & IoT Academy lesson on CoddyKit — lesson 2 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Arduino & IoT Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

Sending Words Out

Once the channel is open, you send text with Serial.print(). Whatever you pass shows up in the Serial Monitor on your computer.

Serial.print("Hello");

Print Stays on One Line

The key thing about Serial.print() is that it does not move to a new line. The next print appears right after it.

Serial.print("Hi");
Serial.print("There");

That Prints HiThere

Those two prints produce HiThere, jammed together with no gap. Print never adds spacing for you.

Meet println

Use Serial.println() when you want each message on its own line. The ln means it adds a line break at the end.

Serial.println("Line one");
Serial.println("Line two");

Clean, Readable Output

That gives you two tidy rows in the Monitor. println is your go-to for status messages you read top to bottom.

Printing Numbers

You are not limited to text. Pass a number and Serial.print() converts it to readable digits automatically.

int score = 42;
Serial.println(score);

Build a Label

Mix text and values for clarity. Print the label first, then print the number, so output reads like a sentence.

Serial.print("Score: ");
Serial.println(score);

Why Labels Help

A bare number like 42 means nothing later. A label like Score: 42 tells you exactly what you are looking at.

Print Inside loop

Calls to print and println usually live in loop(), so values keep streaming out as your program runs.

void loop() {
  Serial.println("running");
}

A Common Pattern

A neat habit: print the label, then println the value. The label glues to the number, then the line wraps cleanly.

Serial.print("Temp: ");
Serial.println(24);

Pick the Right One

Reach for print when more output follows on the same line, and println when this is the end of the line. 🙂

Quick Check

Which call ends the current line and moves output to the next row?

Recap

You learned that print keeps output on one line while println adds a break, and that labeling values makes your Monitor easy to read. 🎉

Frequently asked questions

Is the “Serial.print vs println” lesson free?

Yes — the full text of “Serial.print vs println” is free to read here on the web, and the Arduino & IoT Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Arduino & IoT Academy course, upgrade to CoddyKit PRO.

What will I learn in “Serial.print vs println”?

Send labeled values to the Serial Monitor. You practise Arduino & IoT Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start Arduino & IoT Academy?

No prior experience is required. Arduino & IoT Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 2 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “Serial.print vs println” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this Arduino & IoT Academy lesson?

Yes. Every Arduino & IoT Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. Serial.begin and Baud Rate
  2. Serial.print vs println
  3. Watch Sensor Values Live
  4. Read Commands You Type
← Back to Arduino & IoT Academy