Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to create a custom character on the LCD.
Arduino
byte smiley[8] = {0x00, 0x0A, 0x00, 0x00, 0x11, 0x0E, 0x00, [1];
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using a non-zero value for the last byte can distort the character shape.
✗ Incorrect
The last byte in the custom character array is 0x00 to complete the 8-byte pattern.
2fill in blank
mediumComplete the code to load the custom character into the LCD memory.
Arduino
lcd.createChar([1], smiley); Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using an index outside 0-7 causes errors or overwrites memory.
✗ Incorrect
Custom characters are stored in locations 0 to 7 in LCD memory; 0 is the first slot.
3fill in blank
hardFix the error in the code to display the custom character on the LCD.
Arduino
lcd.setCursor(0, 0); lcd.write([1]);
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Passing the array name instead of the index.
Using character literals like '0' instead of numeric index.
✗ Incorrect
lcd.write() expects the index of the custom character (0-7), not the array or character literal.
4fill in blank
hardFill both blanks to define and display a heart custom character on the LCD.
Arduino
byte heart[8] = [1]; lcd.createChar(1, [2]);
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Passing the wrong array or variable name to createChar.
Using incorrect byte patterns for the heart shape.
✗ Incorrect
The heart array must be defined with the correct byte pattern and passed to createChar.
5fill in blank
hardFill all three blanks to create, store, and display a smiley face custom character at position (0,1).
Arduino
byte smiley[8] = [1]; lcd.createChar([2], smiley); lcd.setCursor(0, [3]); lcd.write([2]);
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up the index for createChar and write.
Incorrect cursor position for displaying the character.
✗ Incorrect
Define the smiley array, store it at index 0, then set cursor to column 0, row 1, and write the character at index 0.
