LiquidCystalIO with a DfRobot shield
01-08-2020
Visit associated GitHub repository
Visit reference documentation page

DfRobot provides the simplest way to get started with LiquidCrystalIO on Uno and Mega (and other compatible boards). It has a display with an array of switches connected to A0 (up, down, left, right and select). This library works correctly with the display and even has a shorthand way of creating the LCD for this case.


Connections to an Arduino Uno, Mega

This board is for use with Arduino Uno and Mega devices, because they are compatible with the original wiring pin out spec. The pin connections are as follows:

Pin Function
8 RS
9 EN
10 Backlight
A0 Buttons
4 D4
5 D5
6 D6
7 D7
A0 Joystick

When using with LiquidCrystalIO, you can use the no-argument constructor, which is specifically for DfRobot where the pins are known upfront.

Using the backlight as PWM

As the backlight is actually on a PWM pin (at least on Uno), then you have the option of configuring the library to use PWM for the backlight instead.

During setup simply do the following:

// DF robot back light is on pin 10, which is PWM, provide values between 0 and 255
myLcd.configureAnalogBacklight(internalAnalogIo(), 10);
myLcd.setBacklight(128);

This allows you to control the backlight level at any time by using the setBacklight method.

dfRobot LCD shield examples

Back to the main page

These may be of interest

Want to let us know about something?

We use cookies to analyse traffic and to personalise content. We also embed Twitter and Youtube on some pages, these companies have their own privacy policies.

See the privacy policy and terms of use of this site should you need more information or wish to adjust your settings.