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

SX1308 DC-DC 2V-24V to 2V-28V 2A Adjustable Boost Regulated Power Supply Module High Current

Get SX1308 DC-DC 2V-24V to 2V-28V 2A Adjustable Boost Regulated Power Supply Module High Current Introduction:   The SX1308 boost module is equipped with the SX1308 chip, which has a small package and high efficiency. The output is adjustable up to 28V, and the internal integration of very low RDS internal resistance 100mΩ metal oxide semiconductor field effect transistor (MOSFET) can achieve high current output within 2A. Widely used in 3G network products, digital products, mobile power, battery-powered equipment.   Features:   Oscillation frequency 1.2MHz, efficiency up to 95% The circuit has short circuit protection, overheat protection and other functions 10K price potentiometer, adjust voltage output   Parameters:   Input voltage range: DC 2V-24V Output voltage range: DC 2V-28V Switching frequency: 1.2MHz Output current: ≤ 2A Package includes: 1 x Power supply module SX1308 DC-DC 2V-24V to 2V-28V 2A Adjustable Boost Regulate...

Wire Connector SPL-4 Quick Terminal 4 Position Docking Connector High Power Connector

Get Wire Connector SPL-4 Quick Terminal 4 Position Docking Connector High Power Connector Feature: Rated Voltage: 600V/2.5KV Rated Current: 32A Soild Wire Size: 0.08-2.5mm 2 /28-14AWG Multi-folded Soft Wire Size: 0.08-4mm 2 /28-12AWG Strip Length: 9-10mm/0.35-0.39inch Plastic Material: PA66 V-2 Shrapnel: Stainless Steel Contact Material: Electrolytic Copper Nickel Tin Ambient Temperature: -40 ~ +105 degree Package included: 1 x SPL-4 Wire Connector Wire Connector SPL-4 Quick Terminal 4 Position Docking Connector High Power Connector See detail

LM2596S DC-DC 24V/12V To 5V 5A Step Down Power Supply Buck Converter Adjustable USB Step-down Charging Module

Get LM2596S DC-DC 24V/12V To 5V 5A Step Down Power Supply Buck Converter Adjustable USB Step-down Charging Module Features: Synchronous rectification scheme, wide voltage input, high current output, high efficiency. With DC plug and terminals, easy to use. With USB port, with fast-charge identification chip compatible with Andrews and iphone mobile phone.   Product parameters:   Input voltage: DC 9V - 36V The output voltage: 5.2V / 5A / 25W Output capability:  9 ~ 24V Input: Output 5.2V / 6A / 30W                              24 ~ 32V Input: Output 5.2V / 5A / 25W                              32 ~ 36V Input: Output 5.2V / 3.5A / 18W Size: 63 x 27 x 10mm (L * W * H) Weight: 22g   Package included: 1 x LM2596S DC-DC 24V/12V To 5V 5A Step Down Module LM2596S DC-DC 24V/12V To 5V 5A Step Down Power Supply Buck Converter Adjustable USB Step-down Charging Module See detail