Elmwood no more, long live Elmwood! Elmwood Electronics and PiShop are now together!
Please order via PiShop.ca, as we are no longer taking orders through this site.
More details are in our blog!

LCD Shield: simple interactive control from your Arduino

September 07, 2017

There are some Arduino projects that you just can't get working without some manual interaction. Can you imagine trying to use a smart thermostat that had no way of showing the current temperature or setting the schedule? So sometimes you just need a display and some control buttons.

With all the wonderful new products out there, it's sometimes easy to overlook some of the older, less fancy ones that still work really well. One of these is the Adafruit LCD Shield Kit with 16×2 Character Display.

Arduino + LCD Shield + Breadboard = tiny control station

Here I've got one controlling the colour and brightness of a 8mm diffused through-hole NeoPixel. It really was magenta when I took that picture, honest: you either get the LCD legible or the LED the right colour.

I've made a couple of additions to the LCD shield to make it more useful for breadboarding simple control projects:

  • Even through we're never going to put another shield over this display, I fitted stacking headers so I could easily run jumper wires to the breadboard. You have to spring the upper set of headers out a little to make them clear the display.
  • The Arduino Uno is mounted on an Arduino and Breadboard Holder with a fancy translucent red breadboard next to it. A regular half size breadboard would work just as well, too.
  • For a final detail, I soldered some wires under the Arduino board to the +5V and GND pins. This allows me to power the rails on the breadboard without taking up any of the header sockets. I've always wondered why the Arduino boards didn't provide alternative power take-off points …

Using the shield is pretty simple. Adafruit's example code is a great start. Writing to the screen works in the same way as the standard LiquidCrystal library. Just remember that you've only got two lines of 16 characters, and you have to deal with new lines and cursor positioning yourself. The control buttons are debounced for you, and you only need to call readButtons() to read them all at once. You might even be able to use a menu management library like LiquidMenu to make your interaction simpler.

The best feature of this shield, however, is that it only uses two pins via the magic of the on-board MCP23017 port expander. This leaves most of the rest of your Arduino pins free for your use.


Also in News

Elmwood no more, long live Elmwood! Elmwood Electronics and PiShop are now together!

October 03, 2022

Elmwood no more, long live Elmwood! Elmwood Electronics and PiShop are now together! Please see our blog for more info.

Continue Reading

Adding RGB LEDs to an illuminated arcade button

March 14, 2022

Continue Reading

We Made a Media Controller!

October 12, 2021

Continue Reading