Position the Cursor & Print
Place text exactly on rows and columns.
Position the Cursor & Print is a free Arduino & IoT Academy lesson on CoddyKit — lesson 3 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.
Text Has a Position
Every character lands at a specific spot on the screen. Controlling the cursor lets you place text exactly where you want it. 🎯
Columns Count from Zero
The 16 columns are numbered 0 to 15, left to right. Column 0 is the first character on a line.
Rows Count from Zero Too
The two rows are 0 and 1. Row 0 is the top line and row 1 is the bottom line.
Move the Cursor
Use setCursor to jump to a column and row before printing. The arguments are column first, then row.
lcd.setCursor(0, 1);Print at That Spot
After setCursor, the next lcd.print() starts exactly where you placed the cursor instead of the top-left.
lcd.setCursor(0, 1);
lcd.print("Line two");Two Lines at Once
Print a label on row 0, move the cursor to row 1, then print a value. That gives you a tidy two-line layout.
Center Some Text
To center a word, set the cursor to a higher column so the text starts further from the left edge.
lcd.setCursor(5, 0);Printing Numbers
lcd.print also accepts numbers, not just text. Pass a variable and the value shows up directly on screen.
lcd.print(temperature);Watch Leftover Characters
Old text does not vanish on its own. If a new value is shorter, stray old digits can linger behind it.
Pad to Overwrite
Print extra spaces after a short value, or clear that area, so the previous longer text is fully covered.
lcd.print(value);
lcd.print(" ");Home Position
Calling lcd.home() sends the cursor back to column 0, row 0 without clearing the existing text.
lcd.home();Quick Check
You want text to appear on the bottom-left of a 16x2 LCD. Which call positions the cursor there?
Recap
You can now place text anywhere with setCursor, remembering column then row from zero, and pad with spaces to clear old characters. ✅
Frequently asked questions
Is the “Position the Cursor & Print” lesson free?
Yes — the full text of “Position the Cursor & Print” 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 “Position the Cursor & Print”?
Place text exactly on rows and columns. 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 3 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “Position the Cursor & Print” 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
- Wire a 16x2 LCD (I2C Backpack)
- LiquidCrystal_I2C Library
- Position the Cursor & Print
- Live Sensor Dashboard