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:

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

Other pages within this category

comments powered by Disqus

This site uses cookies to analyse traffic, and to record consent. We also embed Twitter, Youtube and Disqus 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.

Send a message
X

Please use the forum for help with UI & libraries.

This message will be securely transmitted to our servers.