Categories

Keypad Shield Blue Backlight For Arduino LCD 1602 Board

Keypad Shield Blue Backlight For Arduino LCD 1602 Board
Keypad Shield Blue Backlight For Arduino LCD 1602 Board Keypad Shield Blue Backlight For Arduino LCD 1602 Board Keypad Shield Blue Backlight For Arduino LCD 1602 Board Keypad Shield Blue Backlight For Arduino LCD 1602 Board Keypad Shield Blue Backlight For Arduino LCD 1602 Board
Brand: Giga
Product Code: ARDUINOLCD1602KEPAD
Availability: 12
Price: R174.00
Ex Tax: R174.00
Qty:     - OR -   Add to Wish List
Add to Compare

Keypad Shield Blue Backlight For Arduino LCD 1602 Board.

 

Description:

Keypad Shield Blue Backlight For Arduino Robot LCD 1602 Board

Brand new and high quality.
This is a basic 16 character by 2 line black-on-green display.
Utilizes the extremely common HD44780 parallel interface chipset.
Interface code is freely available.
Blue Backlight with white words.
Uses 4 Bit Arduino LCD Library.
Size:8cm x 5.9cm - 3.15inch x 2.32inch.

Software Library

  1. Library
  2. Enclosure 3D Print files Thingevers
  3. Arduino Exsample


Package included:

1 x Arduino LCD1602 Keypad Shield for Duemilanove Freeduino.


Which Pins?

As shown on the picture, the LCD module is soldered onto a circuit board / shield – so the next step is to map the pin-out from the display module (typically, the display module will have labels printed on the pins on its header) and to the pins on the shield that connect to the Arduino.

With multilayered printed circuit boards, that’s not a great strategy: I simply used a multi-meter, which gave the following
1602 LCD Module Pin | Arduino Pin
D7 D7
D6 D6
D5                                      D5
D4                                      D4
RS D8
E D9
 
No other pins are connected – this is a 4-bit parallel display module.
 
All this should allow us to write text to the display … but there’s one little caveat left…
Printing to the LCD Keypad Shield
 
The sketch is rather simple, and is included below:
Exsample code to write to display
 
 #include <LiquidCrystal.h>
 
// initialize the library with the numbers of the interface pins
//    LiquidCrystal lcd(RS, enable, d4, d5, d6, d7); //
//
// The parameters to this initialisation function are the pins on 
// the Arduino board that are connected to the pins on the LCD Module, 
// i.e., the pins on the right column in the table above.
//
// The first parameter is the “RS” — which, literally, means 
//      “Register Select”, and which is used to tell the
//       module if “that which comes over the bus (the set of data pins)
//       corresponds to “data to print” or “control instructions”
//
// The second parameter is “Enable Signal"
//       the remaining parameters are the 4 digital pins forming the bus.
//
LiquidCrystal lcd(8, 9, 4, 5, 6, 7);
 
int i = 0;
void setup() {
      // set up the LCD's number of columns and rows:
      lcd.begin(16, 2);
}
 
void loop() {
      lcd.setCursor(0, 0);
      lcd.print("Hello World");
      lcd.setCursor(0, 1);
      lcd.print(i);
      i++;
}
 
Now we need to read the Keboards.

For the other 5 buttons, they all map to one pin – to the analog pin A0, which when read will give different values depending on which button is pressed. This is achieved by a circuit of resistors connected like so, and A0 measuring the potential as indicated on the diagram:

I’m not including the values of the resistors, as that’s really not interesting for what we’re doing: writing a sketch using the keypad. What is interesting is what values one read from A0 when a button is pressed. To this end, I use a small sketch like this, which simply writes the value read on A0 on the (in this case) LCD:

Exsample Codes to display ke predd on LCD

#include <LiquidCrystal.h>

#define btnRIGHT 0
#define btnUP 1
#define btnDOWN 2
#define btnLEFT 3
#define btnSELECT 4
#define btnNONE 5
#define btnUNKNOWN 6

int readkeypad(){
      int adc_key_in = analogRead(0); //
      int ret = btnUNKNOWN;

      if (adc_key_in < 50) ret = btnRIGHT;
      if ((adc_key_in > 500) && (adc_key_in < 1150)) ret = btnNONE;
      if ( (adc_key_in > 120) && (adc_key_in < 150) ) ret = btnUP;
      if ( (adc_key_in > 250) && (adc_key_in < 350) ) ret = btnDOWN;
      if ( (adc_key_in > 450) && (adc_key_in < 500) ) ret = btnLEFT;
      if ( (adc_key_in > 700) && (adc_key_in < 750) ) ret = btnSELECT;

      return ret;
}

// Just for ease of displaying
const char *button[7] ={"Right ", "Up ", "Down ", "Left ", "Select ", " ", "??????"};

LiquidCrystal lcd(8, 9, 4, 5, 6, 7);

void setup() {
      lcd.begin(16, 2);
}

void loop() {
      lcd.setCursor(0, 0);
      lcd.print("Button Pressed:");
      lcd.setCursor(0, 1);
      lcd.print(button[readkeypad()]);
}

Details pictures : 

 

Here is an exsample of a 3D printed enclosure details se details in link below

  1. Enclosure 3D Print files Thingevers

Here is an example of how this unit can be used in conjunction with Local oscillator 35Mhz to 4Ghz.

Write a review

Your Name:


Your Review: Note: HTML is not translated!

Rating: Bad           Good

Enter the code in the box below:



Powered By OpenCart
Giga Technology © 2024