Skip to main content

Keypad 4 Button Key Module Switch Keyboard For Arduino UNO MEGA2560 Breadboard

Keypad 4 Button Key Module Switch Keyboard For Arduino UNO MEGA2560 Breadboard
Keypad 4 Button Key Module Switch Keyboard For Arduino UNO MEGA2560 Breadboard Keypad 4 Button Key Module Switch Keyboard For Arduino UNO MEGA2560 Breadboard Keypad 4 Button Key Module Switch Keyboard For Arduino UNO MEGA2560 Breadboard



Description: 
 
Can be inserted directly into Arduino uno mega2560, Ideal for linking up to your  Arduino UNO Mini Nano Mega2560 Breadboard etc, or others MCU ( AVR STM32 ARM PIC AT89C51 STC MSP430 STM8 FPGA CPLD etc.) 
 
4-button Common Cathode key module
GND "K1 K2 K3 K4" 4 PIN OUT 2.54mm
Size: 12.7MM x 33MM.
 
Circuit schematics:

Keypad 4 Button Key Module Switch Keyboard For Arduino UNO MEGA2560 Breadboard

Package includes:

1 x Keyboard


Arduino uno/mega2560 Code
 
//******************************************************//
 
 
/*
Arduino_4key_uart
 
This example code is in the public domain.
*/
 
// Define key pin
int K1 = 13;
int K2 = 12;
int K3 = 11;
int K4 = 10;
 
 
// variables will change:
int buttonState = 0; // variable for reading the pushbutton status
 
// the setup routine runs once when you press reset:
void setup() {
// initialize the keys pin as an input.
 
pinMode(K1, INPUT);
pinMode(K2, INPUT);
pinMode(K3, INPUT);
pinMode(K4, INPUT);
 
//Activate key pin internal pull-up resistors
digitalWrite(K1, HIGH);
digitalWrite(K2, HIGH);
digitalWrite(K3, HIGH);
digitalWrite(K4, HIGH);
 
// initialize serial communications at 9600 bps:
Serial.begin(9600);
}
 
// the loop routine runs over and over again forever:
void loop() {
 
buttonState = digitalRead(K1);
if(!buttonState)Serial.print("k1 n" );
do
{
buttonState = digitalRead(K1);
}
while(!buttonState);//Wait button release
 
buttonState = digitalRead(K2);
if(!buttonState)Serial.print("k2 n" );
do
{
buttonState = digitalRead(K2);
}
while(!buttonState);//Wait button release
 
buttonState = digitalRead(K3);
if(!buttonState)Serial.print("k3 n" );
do
{
buttonState = digitalRead(K3);
}
while(!buttonState);//Wait button release
 
buttonState = digitalRead(K4);
if(!buttonState)Serial.print("k4 n" );
do
{
buttonState = digitalRead(K4);
}
while(!buttonState);//Wait button release
 
delay(100);
}
    
 //******************************************************//



















Keypad 4 Button Key Module Switch Keyboard For Arduino UNO MEGA2560 Breadboard See detail


Popular posts from this blog

5pcs AC 100-240V to DC 12V 5A 60W Switching Power Supply Module Driver Adapter LED Strip Light

Get 5pcs AC 100-240V to DC 12V 5A 60W Switching Power Supply Module Driver Adapter LED Strip Light Features:   1. Good anti-interference performance and high reliability. 2. Low operating temperature and long service life. 3. Wide input voltage range, (100-240V) in line with global usage standards. 4. Good insulation performance and high electric strength. 5. Full load high temperature burning machine, 100% aging test.   Specifications:   Model: HS-60-12 DC output voltage: 12V Output voltage tolerance: ±1% Rated output current: 5A Output current range: 0 - 5A Ripple and noise: 100mVp-p Line stability: ±0.5% Load stability: ±0.5% DC output power: 60W Efficiency: 85% DC voltage adjustable range: ±10% Input voltage range: 100 ~ 240VAC 47 ~ 63Hz; 120-370VDC Input current: 2A/115V 1A/230V Inrush current: cold start current 30A/115V 60A/230V Leakage current: <3.5mA/240VAC Overload protection: 105%~150% Overvoltage protection: 15%-135% Tempera...

BaoFeng Replacement Cable Waterproof Hand Microphone Solid with Indicate Light Electronics Walkie Talkie Clamp Durable Parts for BF 5r

Get BaoFeng Replacement Cable Waterproof Hand Microphone Solid with Indicate Light Electronics Walkie Talkie Clamp Durable Parts for BF 5r Features : - Rainproof - With anti noise design microphone for clear communication. - These mics will clip to our backpack straps at our shoulder or in front for easy access and convenient communications. It is also easier to use these mics while in the car with your handy-talkies.   Specification : All of our items are Brand New Has a remote microphone with push to talk button you can clip anywhere. The Handheld microphone can be easily worn on the body through a clip and easy to carry. Two-pin standard diameter: Ear 3.5mm stereo (top pin). Mic 2.5mm stereo (bottom pin). Space of two-pin: 11mm. Compatible model: UV5R,UV5RA,F8,F8+,UV-82,DM-5R Plus,BF-888,BF-888s   Package includeds : 1 x Rainproof Speaker Mic   Details pictures : BaoFeng Replacement Cable Waterproof Hand Microphone Solid with In...

XH-W1321 0.1 Digital Thermostat Mini Embedded Digital Display Switch Temperature Controller With Waterproof NTC Sensor Meter

Get XH-W1321 0.1 Digital Thermostat Mini Embedded Digital Display Switch Temperature Controller With Waterproof NTC Sensor Meter Specifications:   Product Name: Miniature embedded digital display thermostat Product Model: XH-1321 Material: ABS Case Color: White LED Color: Red/Blue (Optional) Input Voltage: DC12V Temperature Measurement Range: -50-110℃  Temperature Control Range: -50-110℃  Control Accuracy: 0.1℃  Display Accuracy: 0.1℃  Measuring Input: NTC10K Waterproof Probe L=1 Meter Output Type: Relay Output(Output Switch)  Output Capacity: 10A Size (Length x Width x Height): about 56 x 38 x 32mm (2.17 x 1.50 x 1.26” )  Opening hole size: 46 x 34mm Key Function:   SET: Press once during normal use, directly enter the stop temperature setting state, use the up and down keys to set the required stop temperature, long press to enter the internal setting menu. UP: After long press the setting button to enter the internal setting, increase t...