In this guide we show how to render menu items using LiquidCrystalIO library, onto displays compatible with HD44780 (often referred to as LCD). This rendering driver is built into the core menu designer download, meaning it’s available out of the box.
The LiquidCrystalIO library is a fork of the LiquidCrystal library, with a few additional capabilities. Most importantly, updating HD44780 displays is slow, think 270Khz slow. This library avoids long pauses by using task manager for managing these delays, so is uniquely able to keep your tasks running. In addition, it supports device pins, PCF8574, MCP23017, AW9523 and some have even used with our shift register pin abstraction!
If you are connecting the device directly to your Arduino here’s a wiring guide for 20x4 and 16x2 units
First, ensure your menu structure is saved and then choose Code -> Generate Code from the menu. Once the code generation dialog appears, to the right of the current display type will be a button named “Change”. Click this button and choose one of the following new drivers by clicking select on the right.
Depending on which of the above options you picked, some additional properties may be added:
Additional sources of documentation specific to this version, don’t forget that our fork is largely compatible with the original, so you can browse the many docs for that too:
See the takeOverDisplay example packaged with the menu library.
For commonly available backpacks there are fewer configuration items to change. Firstly, the width and height of the display must be set along wi
You can use an analog PWM backlight to control display brightness. It goes without saying that the pin must be able to support the feature. Here we cover the device pins and AW9523 LCD controller cases:
For device pins in setup as follows:
// DF robot back light is on pin 10, which is PWM
myLcd.configureAnalogBacklight(internalAnalogIo(), 10);
For AW9523 LED controller mode:
// GLOBALLY define this variable giving a reference to the actual IO device
AW9523AnalogAbstraction myAw9523Analog(myAw9523Device);
// later in setup configure the backligh
myLcd.configureAnalogBacklight(&myAw9523Analog, backlightPin);
And in either case, you control the level as follows:
myLcd.setBacklight(128);
The levels for the backlight are between 0..255 regardless of the analog range of the device.