1/19
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
What does the function lcd.init() do?
Initializes communication with the LCD.
Which library is used to control the LCD?
LiquidCrystal_I2C.h
What is the role of the line #include
It is required for I2C communication.
What does "16x2" mean in regards to the LCD?
16 characters per row, 2 rows.
What is the purpose of lcd.backlight()?
Turns on the LCD screen light.
What is the function of the SDA pin in I2C communication?
Sends and receives data.
Which Arduino pins are used for I2C on an Uno?
SDA → A4, SCL → A5.
What does lcd.setCursor(0,0) do?
Moves the cursor to the first row, first column.
What does the line pinMode(7, INPUT_PULLUP); mean?
Pin 7 is input with an internal pull-up resistor.
When using INPUT_PULLUP, what is the button state when pressed?
LOW.
What value range does analogRead(A0) return for the potentiometer?
0–1023.
What happens in the line lcd.print(potValue);?
Prints the current potentiometer value.
Why does the code use lcd.print(" "); before printing the potentiometer value?
To overwrite old characters with spaces.
What happens if the LCD’s I2C address is wrong (e.g., 0x20 vs 0x27)?
The LCD will not respond.
What is the delay of delay(200) used for in the loop?
To stabilize readings and reduce flickering.
The cursor coordinates (c, r) in lcd.setCursor(c, r) start from:
(0,0).
Which function clears the LCD completely?
lcd.clear().
What is the advantage of I2C over parallel LCD wiring?
Uses fewer Arduino pins.
If you want to display "Arduino Rocks!" on the second row, first column, what command should you use?
lcd.setCursor(1,2); lcd.print("Arduino Rocks!");
In the example code, what does the LCD show when the button is pressed?
"1".