Recall & Review
beginner
What does the
lcd.setCursor(col, row) function do in Arduino LCD programming?It moves the cursor to the specified column (
col) and row (row) on the LCD screen, so the next characters will be printed starting from that position.Click to reveal answer
beginner
How are the column and row numbers indexed in
lcd.setCursor(col, row)?Both column and row numbers start at 0. So,
lcd.setCursor(0, 0) moves the cursor to the top-left corner of the LCD.Click to reveal answer
beginner
Why is it important to set the cursor position before printing text on an LCD?
Because the LCD prints characters starting from the current cursor position. If you don't set it, text might appear in unexpected places or overwrite existing text.
Click to reveal answer
intermediate
What happens if you set the cursor position outside the LCD's size using
lcd.setCursor()?The behavior is undefined; usually, the LCD will ignore the command or wrap around, causing text to appear in wrong places or not at all.
Click to reveal answer
beginner
How do you clear the LCD screen and reset the cursor to the home position?
Use
lcd.clear() to clear the screen and reset the cursor to (0, 0).Click to reveal answer
What does
lcd.setCursor(5, 1) do?✗ Incorrect
The first number is the column, the second is the row. So it moves the cursor to column 5, row 1.
If you want to print text at the top-left corner of the LCD, which command should you use?
✗ Incorrect
Columns and rows start at 0, so (0, 0) is the top-left corner.
What happens if you print text without setting the cursor position first?
✗ Incorrect
The LCD prints text starting from wherever the cursor currently is.
Which function clears the LCD screen and resets the cursor?
✗ Incorrect
lcd.clear() clears the screen and resets the cursor to (0,0).What is the correct way to move the cursor to the second row, third column?
✗ Incorrect
Columns and rows start at 0, so third column is 2 and second row is 1.
Explain how to position the cursor on an Arduino LCD before printing text.
Think about how you tell the LCD where to start writing.
You got /3 concepts.
Describe what happens if you try to set the cursor outside the LCD's visible area.
Consider what happens if you point somewhere the LCD can't show.
You got /3 concepts.
