yasurs llc
0
All posts from yasurs llc
yasurs llc in yasurs llc,

Reading the buttons and features of LCD Keypad Shield

The sainsmart LCD Keypad Shield has a handy 16-character by 2-line display, 5 buttons and a controllable backlight, plug it straight in on top of your Arduino controller boards. The display is set behind the shield for a low profile fitment and nice look and we've included panel mounting screw holes in the corners.

The buttons provide "left", "right", "up", "down", and "select" while using just one analog input. That leaves the other analog inputs free for you to use in your projects.

A0, using a chain of resistors that causes a different reference voltage to be applied to A0 depending on which button is pressed.If no button is being pressed,the voltage on A0 will be pulled all the way up to 5V by the 2K resistor called R6. In that situation none of the other resistors have any effect at all, and the analog reading on A0 will be hard on the upper limit of 1023. Therefore if you perform an analogRead() call on A0 and it returns 1023 (or any value above about 1000) you know that no buttons are being pressed.

The same principle is also applies for the other buttons.

Features:

16x2 LCD using HD44780-compatible display module

5 buttons on one analog input

LCD backlight with current limiting, brightness and on/off controllable by D3, can be moved to a number of other pins for easy project pin compatibility

Recessed LCD, panel mount screwholes and button layout suitable for panel or cabinet mounting if desired.

Reset button

Power supply smoothing capacitor

Gold-plated PCB for maximum durability

Overlay printed on both top and bottom

Pins used by shield clearly marked, LiquidCrystal library setup reference is on the bottom of the pcb for convenience.

Overlay printed on both top and bottom

Pins used by shield clearly marked, LiquidCrystal library setup reference is on the bottom of the pcb for convenience