By dave | August 1, 2020

LiquidCystalIO with a DfRobot shield

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:

PinFunction
8RS
9EN
10Backlight
A0Buttons
4D4
5D5
6D6
7D7
A0Joystick

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

Other pages within this category

This site uses cookies to analyse traffic, and to record consent. We also embed Twitter and Youtube content on some pages, these companies have their own privacy policies.

Our privacy policy applies to all pages on our site

Should you need further guidance on how to proceed: External link for information about cookie management.