Deep Dive: hd44780 Reference
In the example above we created an
hd44780_I2Cexp object called
lcd that was used to control the LCD screen (similar to how we created a
Servo object to control each servo motor in Lab 8). Here are some useful methods that can be used with an
||Initialize the screen, letting the library know what size it is (ours is 16x2).|
||Clear the screen.|
||Print a number or text string to the screen.|
||Move the cursor (where text prints) to position (x, y). The position (0, 0) is the top-left corner of the screen and is where the cursor starts. In the example program, when we use
||Turn on the blinking cursor. (Initially off.)|
||Turn off the blinking cursor.|
||Turn on the backlight. (Initially on.)|
||Turn off the backlight.|
The full documentation for the LCD library is available here. There are more functions available, although most of them are just for making the contents of the screen scroll as text is printed.
By using the
createChar() function it is possible to create and display your own custom characters on the LCD, although you will have to consult the documentation and library examples to figure out how to use it.