1602 LCD Keypad Shield - pins used vs. pins available on it

Hello,

First of all, sorry for my lack of technical terms as I just started and I don't have an electronics background.

I just got this 1602 LCD Keypad Shield and I use it by instantiating LiquidDisplay with pins (8,9, 4, 5, 6, 7).

The problem is that the shield has those holes where I can solder other pins only over pins D1-D7. On the analog side it has holes for all the unused pins (A1-A5).

How can I use the pins that are not used by the shield? (D11-D13 and D1-D3)

Pin 10 is not directly/extra reachable*, all other are routed to holes.

J5.png

  • Found out pin 10 is the backlight control, so it is taken anyway.

Pin Allocation:
Analog 0 Button (select, up, right, down and left)
Digital 4 DB4
Digital 5 DB5
Digital 6 DB6
Digital 7 DB7
Digital 8 RS (Data or Signal Display Selection)
Digital 9 Enable
Digital 10 Backlit Control

i have one attached to a mega. don’t consern yourself with the fact that the shield covers 8, 9, 4, 5, 6, 7. the shield is aware of that and handles it. use A0 to read the buttons, and you don’t have to connect that either.

what you will need to do, at least as far as i found, is connect a potentiomoter. use v0 on the shield - upper left. without it, all i got was a lit blank screen. there’s many examples out there - it’s a standard connecton.

use 5v and gnd on the shield, bottom middle, next to the buttons, to distribute power/ground.

code segments, including one on how to read buttons. buttons don’t always return the same value - even for each one.

// lcd w/keypad shield for arduino
//
LiquidCrystal lcd( 8, 9, 4, 5, 6, 7 );
//
const int lcd_key_pin = A0;
int key_in = 0;
//
const int b_right = 1;
const int b_up = 2;
const int b_down = 3;
const int b_left = 4;
const int b_select = 5;
const int b_none = 0;
//
int read_LCD_buttons( void );

// read the buttons
//
int read_LCD_buttons( void ) {

key_in = 901; // set starting point for each iteration. indicates no button
do {
key_in = analogRead( lcd_key_pin ); // read the value from the sensor
} while( key_in >= 900 ); // wait for a/any button press

// return values from buttons are approxomately these for each button: ±5 to 10
// – right : 35
// – up : 158
// – down : 324
// – left : 486
// – select : 711

// we play “the price is right” and try to pick the closest number without going over
//
if( key_in < 50 )
return b_right;
if( key_in < 200 )
return b_up;
if( key_in < 350 )
return b_down;
if( key_in < 500 )
return b_left;
if( key_in < 750 )
return b_select;

return b_none; // when all others fail, return this
}