4x3 Matrix 12 Key Membrane Switch Keypad [S228]



https://www.youtube.com/watch?v=15Asj5XZBlg


* Specs

Pad Size: 69.2 x 76.9 x 0.8mm

Cable Length: 3-1/3" or 86mm (include connector)

Connector: Dupont 7 pins, 0.1" (2.54mm) Pitch

Mount Style: Self-Adherence

Max. Circuit Rating: 35VDC, 100mA

Insulation Spec.: 100M Ohm, 100V

Dielectric Withstand: 250VRms (60Hz, 1min)

Contact Bounce: <=5ms

Life Expectancy: 1 million closures

Operation Temperature: -20 to +40 °C

 

Package:

1PCS X4 x 3 Matrix Array 12 Key Membrane Switch Keypad Keyboard

 

* Contents

- LIbrary : http://playground.arduino.cc/uploads/Code/keypad.zip

- Connect

7 ----- D9

6 ----- D8

5 ----- D7

4 ----- D6

3 ----- D5

2 ----- D4

1 ----- D3


- Key Code

#include <Keypad.h>

const byte ROWS = 4; //four rows

const byte COLS = 3; //four columns

//define the cymbols on the buttons of the keypads

char hexaKeys[ROWS][COLS] = {

 {'1','2','3'},

 {'4','5','6'},

 {'7','8','9'},

 {'*','0','#'}

};

byte rowPins[ROWS] = {9, 8, 7, 6}; //connect to the row pinouts of the keypad

byte colPins[COLS] = {5, 4, 3}; //connect to the column pinouts of the keypad

//initialize an instance of class NewKeypad

Keypad customKeypad = Keypad( makeKeymap(hexaKeys), rowPins, colPins, ROWS, COLS);

void setup(){

 Serial.begin(9600);

}

 

void loop(){

 char customKey = customKeypad.getKey();

 

 if (customKey){

 Serial.println(customKey);

 }

}

Posted by RDIoT
|

4x5 Matrix Array 20 Keypad [S187]




https://www.youtube.com/watch?v=JNL_hOtghXk


*GitHub https://github.com/rdiot/rdiot-s187.git


* Specs

Panel Size: 75*85mm. 

Length: 18CM. 

Insulation Resistance:100M 100V. 

Withstand Voltage:250V Rms.(50-60Hz lmin) 

Storage Temperature: +15°- +35°. 

Storage Humidity:70-90.


* Contents

byte rowPins[numRows] = {10,9,8,7,6}; 

byte colPins[numCols]= {2,3,4,5};

- Connect

D2 ~ D9

- Key Code

#include <Wire.h> 

#include <LiquidCrystal_I2C.h>

#include <Keypad.h>

 

LiquidCrystal_I2C lcd(0x27,20,4);  // LCD2004

 

const byte numRows= 5; //number of rows on the keypad

const byte numCols= 4; //number of columns on the keypad

 

//keymap defines the key pressed according to the row and columns just as appears on the keypad

char keymap[numRows][numCols]= 

{

  {'A','B','#','*'},

  {'1','2','3','U'},

  {'4','5','6','D'},

  {'7','8','9','C'},

  {'L','0','R','E'}

};

 

byte rowPins[numRows] = {10,9,8,7,6}; 

byte colPins[numCols]= {2,3,4,5}; 

 

//initializes an instance of the Keypad class

Keypad myKeypad= Keypad(makeKeymap(keymap), rowPins, colPins, numRows, numCols);

 

String numstr = "";

 

void setup()

{

  lcd.init();  // initialize the lcd 

  lcd.backlight();

  lcd.print("start LCD2004");

 

  delay(1000);

 

  lcd.clear();

}

 

void loop()

{

 

  lcd.setCursor(0,0);

  lcd.print("S187:4x5 20 Keypad");

 

 

  char keypressed = myKeypad.getKey();

  if (keypressed != NO_KEY)

  {

   // Serial.print(keypressed);

    lcd.setCursor(0,1);

    lcd.print("keypressed=" + (String)keypressed + "  ");

 

    switch (keypressed)

    {

      case '1':        

           numstr = "1    ";

        break;

      case '2':           

           numstr = "2    ";

        break;  

      case '3':           

           numstr = "3    ";

        break; 

      case '4':           

           numstr = "4    ";

        break; 

      case '5':           

           numstr = "5    ";

        break;                 

      case '6':           

           numstr = "6    ";

        break; 

      case '7':           

           numstr = "7    ";

        break; 

      case '8':           

           numstr = "9    ";

        break; 

      case '0':           

           numstr = "0    ";

        break; 

      case 'A':           

          numstr = "F1   ";

        break; 

      case 'B':           

          numstr = "F2   ";

        break; 

      case 'C':           

          numstr = "ESC  ";

        break; 

      case 'E':           

          numstr = "ENTER";

        break; 

      case 'D':           

          numstr = "DOWN ";

        break; 

      case 'U':           

          numstr = "UP   ";

        break; 

      case 'R':           

          numstr = "RIGHT ";

        break; 

      case 'L':           

          numstr = "LEFT ";

        break; 

      case '*':           

          numstr = "*    ";

        break; 

      case '#':           

          numstr = "#    ";

        break;                                                 

        

      default:          

        break;

    }

 

 

    if(numstr !="")

    {

      lcd.setCursor(0,2);

      lcd.print("numstr=" + (String)numstr + " ");

    }

 

  }

 

}

Posted by RDIoT
|

TTP229 16 Key Capacitive Touch Keypad (TTP229) [S153]




https://www.youtube.com/watch?v=NXZR0p-kX1A


*GitHubhttps://github.com/rdiot/rdiot-s153.git


* Specs

Operating voltage:2.4V~5.5V

Built-in regulator

Stand-by current At 3V, and sleep mode slow sampling rate 8Hz:

=> Typical 2.5uA for 16 input keys

=> Typical 2.0uA for 8 input keys

8 Key or 16 key modes

Separate outputs to 8 keys in 8 key mode

2 wires serial output interface for both 16 key and 8 key mode

Outputs can be set to CMOS/OD/OC with active high/low

2 Wires serial interface can select active high or low by option

Optional Multi-key or single-key

Provides two kinds of sampling rate: slow sampling rate 8Hz and fast sampling rate 64Hz at sleep mode

Optional maximum key-on time about 80sec

Auto calibration at power up (keypad must not be touched for 0.5 seconds after power up)

Auto calibration for changes in environment

 

1.....VCC (2.4 - 5.5V)

2.....GND

3.....SCL (serial clock in)

4.....SDO (serial data out)

5.....OUT 1 (key 1 state)

6.....OUT 2 (key 2 state)

7.....OUT 3 (key 3 state)

8.....OUT 4 (key 4 state)

9.....OUT 5 (key 5 state)

10...OUT 6 (key 6 state)

11...OUT 7 (key 7 state)

12...OUT 8 (key 8 state)


* Contents

- Connect

VCC ----- 5V

GND ----- GND

SCL -----> D2 

SDO -----> D3 


- Key Code

#define pulse 2

#define data 3


int old  = 0;


void setup()

{

  Serial.begin(9600);

  pinMode(pulse, OUTPUT);  

  pinMode(data, INPUT); 

}


void loop()

{

  int Key = getkey();

  

  if (Key!=0&Key!=old)

  {

    Serial.print("PUSH--->");

    Serial.println(Key);


  }

    

  old = Key;

}



byte getkey(void)

{

  byte cnt;

  byte num = 0;

  for(cnt = 1; cnt < 17; cnt++)

  {

    digitalWrite(pulse, LOW); 

    

    if (digitalRead(data) == 0)

      num = cnt; 

    

    digitalWrite(pulse, HIGH);

  }  

  

  return num; 

}

Posted by RDIoT
|

4x4 Matrix Keyboard Keypad [S188]




https://www.youtube.com/watch?v=YU6Nc10mqug


*GitHubhttps://github.com/rdiot/rdiot-s188.git


* Specs

Small and compact in size

MR-MINI-4x4KEY is a 4x4 matrix keyboard module. It has 8 pins and 10 number 4 Letters on the interface

8-PIN MRconnect hole

+3.0V to +5VDC supply voltage

On-board pulled-up resistors

Four mounting holes on each corner

Dimension:7cm*6.5cm*0.5cm( approx)


* Contents

byte colPins[numRows] = {2,3,4,5}; //col 0 to 3

byte rowPins[numCols]= {6,7,8,9}; //row 0 to 3


- Connect

1(LEFT) ----- D2

2 ----- D3

3 ----- D4

4 ----- D5

5 ----- D6

6 ----- D7

7 ----- D8

8(RIGHT) ----- D9


- Key Code

const byte numRows= 4; //number of rows on the keypad

const byte numCols= 4; //number of columns on the keypad

 

//keymap defines the key pressed according to the row and columns just as appears on the keypad

char keymap[numRows][numCols]= 

{

  {'1','2','3','A'},

  {'4','5','6','B'},

  {'7','8','9','C'},

  {'*','0','#','D'}

};

 

byte colPins[numRows] = {2,3,4,5}; //col 0 to 3

byte rowPins[numCols]= {6,7,8,9}; //row 0 to 3


  char keypressed = myKeypad.getKey();

    switch (keypressed)

    {

      case '1':        

    lcd.print("keypressed=" + (String)keypressed + "  ");

      break;

    }

Posted by RDIoT
|

4x4 Matrix Keyboard 16 Key Membrane Switch Keypad [S087]



https://www.youtube.com/watch?v=AdKrsusar-I


*GitHubhttps://github.com/rdiot/rdiot-s087.git


* Specs

4 * 4 Matrix Keyboard 16 Key Membrane Switch Array Keypad For Arduino


* Contents

- Connect

1(LEFT) ----- D2

2 ----- D3

3 ----- D4

4 ----- D5

5 ----- D6

6 ----- D7

7 ----- D8

8(RIGHT) ----- D9


- Key Code

#include <Wire.h> 

#include <LiquidCrystal_I2C.h>

#include <Keypad.h>

 

LiquidCrystal_I2C lcd(0x27,20,4);  // LCD2004

 

const byte numRows= 4; //number of rows on the keypad

const byte numCols= 4; //number of columns on the keypad

 

//keymap defines the key pressed according to the row and columns just as appears on the keypad

char keymap[numRows][numCols]= 

{

  {'1','2','3','A'},

  {'4','5','6','B'},

  {'7','8','9','C'},

  {'*','0','#','D'}

};

 

byte rowPins[numRows] = {2,3,4,5}; //Rows 0 to 3

byte colPins[numCols]= {6,7,8,9}; //Columns 0 to 3

 

//initializes an instance of the Keypad class

Keypad myKeypad= Keypad(makeKeymap(keymap), rowPins, colPins, numRows, numCols);

 

String numstr = "";

 

void loop()

{

 

  lcd.setCursor(0,0);

  lcd.print("S087:4x4 16 keypad");

 

 

  char keypressed = myKeypad.getKey();

  if (keypressed != NO_KEY)

  {

   // Serial.print(keypressed);

    lcd.setCursor(0,1);

    lcd.print("keypressed=" + (String)keypressed + "  ");

 

    switch (keypressed)

    {

      case '1':        

           numstr += "1";

        break;

      case '2':           

           numstr += "2";

        break;  

      case '3':           

           numstr += "3";

        break; 

      case '4':           

           numstr += "4";

        break; 

      case '5':           

           numstr += "5";

        break;                 

      case '6':           

           numstr += "6";

        break; 

      case '7':           

           numstr += "7";

        break; 

      case '8':           

           numstr += "9";

        break; 

      case '0':           

           numstr += "0";

        break; 

 

      case 'D':           

          lcd.setCursor(0,3);

          lcd.print("Dial:"+numstr);

        break; 

 

      case 'C':           

          lcd.clear();

          numstr = "";

        break; 

 

      default:          

        break;

    }

 

 

    if(numstr !="")

    {

      lcd.setCursor(0,2);

      lcd.print("numstr=" + (String)numstr + " ");

    }

 

  }

 

}



Posted by RDIoT
|

4x4 Matrix 16 Keypad Keyboard Module [S025]



https://www.youtube.com/watch?v=VQytr1awNRM


*GitHubhttps://github.com/rdiot/rdiot-s025.git



* Specs

4x4 Matrix

Keypad Keyboard module 16 Button

Size: Approx.42mmX42mm / 1.65x1.65


* Contents

1) row = (1, 2, 3, 4) PIN

2) column = (5, 6, 7, 8) PIN 

- Connect

1 ----- D2

2 ----- D3

3 ----- D4

4 ----- D5

5 ----- D6

6 ----- D7

7 ----- D8

8 ----- D9


- Library : ttp://playground.arduino.cc/uploads/Code/keypad.zip


- Key Code

#include <Wire.h> 

#include <LiquidCrystal_I2C.h>

#include <Keypad.h>


LiquidCrystal_I2C lcd(0x27,20,4);  // LCD2004


const byte numRows= 4; //number of rows on the keypad

const byte numCols= 4; //number of columns on the keypad


//keymap defines the key pressed according to the row and columns just as appears on the keypad

char keymap[numRows][numCols]= 

{

  {'0','1','2','3'},

  {'4','5','6','7'},

  {'8','9','A','B'},

  {'C','D','E','F'}

};


byte rowPins[numRows] = {2,3,4,5}; //Rows 0 to 3

byte colPins[numCols]= {6,7,8,9}; //Columns 0 to 3


//initializes an instance of the Keypad class

Keypad myKeypad= Keypad(makeKeymap(keymap), rowPins, colPins, numRows, numCols);


void setup()

{

  lcd.init();  // initialize the lcd 

  lcd.backlight();

  lcd.print("start LCD2004");


  delay(1000);


  lcd.clear();

}


void loop()

{

 

  lcd.setCursor(0,0);

  lcd.print("S025:4x4 16 keypad");


  char keypressed = myKeypad.getKey();

  if (keypressed != NO_KEY)

  {

   // Serial.print(keypressed);

    lcd.setCursor(0,1);

    lcd.print("keypressed=" + (String)keypressed + "  ");


    switch (keypressed)

    {

      case '0':

           lcd.setCursor(0,2);

           lcd.print("if=0, then action");      

        break;

      case 'F':

           lcd.setCursor(0,2);

           lcd.print("if=F, then action");      

        break;  

      default:

          lcd.setCursor(0,2);

           lcd.print("if=defulat       "); 

        break;

    }


  }


}

Posted by RDIoT
|