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

TTGO 0.96 Inch ESP32 V2.0 OLED WiFi Module + Bluetooth Double ESP-32 et OLED 4 MB For Arduino

Get TTGO 0.96 Inch ESP32 V2.0 OLED WiFi Module + Bluetooth Double ESP-32 et OLED 4 MB For Arduino Features:   1. Main control chip uses ESP32, Tensilica dual core processor, clocked at 240 MHz, computing capacity of up to 600 DMIPS, 520 SRAM, 802.11 KB chip b/g/n HT40 Wi-Fi transceiver, baseband, and LWIP protocol stack, Bluetooth (Bluetooth dual-mode integrated traditional and BLE low-power Bluetooth) 2. Onboard 4 M bytes (32 M bit) , flash, and Wi-Fi antennas 3. 0.96-inch White OLED display 4. Lithium battery charging circuit and interface 5. CP2102 USB to serial chip, perfect support for Arduino development   Package includes:   1 x ESP32 OLED V2.0 1 x line ​2 x pin TTGO 0.96 Inch ESP32 V2.0 OLED WiFi Module + Bluetooth Double ESP-32 et OLED 4 MB For Arduino See detail

No-hole Sensor Cabinet Lock Electronic Hidden Home Furniture Door Drawers Lock

Get No-hole Sensor Cabinet Lock Electronic Hidden Home Furniture Door Drawers Lock Features: ● It is suitable only for a wooden door, especially for a drawer, locker, cabinet, sliding door. ● No need to drill holes, no damage to your cabinet. ● Auto return and auto lock function, easy operation. ● Stainless steel latch and ABS plastic case, durable and anti-corrosion. Specifications: - Material: stainless steel - Type: 1 key/2keys - Lock case material: ABS plastic - Accept the thickness of the cabinet door or wardorbe: within 50 mm. - Only suitable for wooden door - Power supply: 4x AA batteries. Package Included: 1 x No-hole Cabinet Lock 1 x Key(1 key/2keys optional) 1 Set Accessory Details Pictures: No-hole Sensor Cabinet Lock Electronic Hidden Home Furniture Door Drawers Lock See detail

433MHz AC 220V 2 Channel Wireless Remote Control Switch Module AK-RK02S-220B+AK-1000-3F Remote Control Transmitter

Get 433MHz AC 220V 2 Channel Wireless Remote Control Switch Module AK-RK02S-220B+AK-1000-3F Remote Control Transmitter Features: 220V 2 channel learning code remote control switch adopts 10A relay, which can load large power electrical appliances; learning MCU decodes and can learn multiple remote controllers; simple and flexible operation; output mode can be switched by short connection reserved solder pad, and point, self-lock and interlock can be selected and used arbitrarily, which is suitable for many applications in many fields; reserved data bit output adjustment port, can be used. By choosing the corresponding key position value of remote control in different positions, it is convenient for customers to match all kinds of remote control they like, and avoids the embarrassment of the old fixed key position matching only a single style remote control. Output without voltage, easy to install.   Specification: Operating Voltage: AC220V W...