October 18th, 2015
  • Long text auto split
  • Auto text centering
  • Button press events

LCD keypad shield

I've made it my quest to create OOP classes for Arduino. Read about that in this blogpost if you need some more context.

These classes are created to control most LCD keypad shield.

I've split the logic into two separate classes, because not all LCD shields have a keypad. You can use the LcdDisplay class with every LCD display that can be controlled with the LiquidCrystal library.

This library is an add-on on the LiquidCrystal library. It automatically splits a longer text over multiple rows and centers the text on each row. You have to make sure the text isn't too long for the LCD screen, otherwise it will fall of the screen. You can see an example here.

The LcdDisplay library can be found here on GitHub.
It uses the LiquidCrystal library which is included with your Arduino development software.

This library is created to handle the up, down, left, right and select buttons from the shield. It calls an event method when a button is pressed or held down. You can see an example here.

The LcdButtons library can be found here on GitHub.
It uses the BaseTimedElement base class which can be found here on GitHub.

< Previous post Overview posts Next post >

Leave a comment

= Thanks for your comment =