Skip to product information
1 of 7

Eletechsup Original Factory Official‌ Store

TB371 TB258 For Arduno Starter Kit Button Key Module & Led Board for Raspberry

TB371 TB258 For Arduno Starter Kit Button Key Module & Led Board for Raspberry

SKU:TB371+TB258

1000 in stock

Regular price $1.99
Regular price $4.99 Sale price $1.99
Sale Sold out

 

Product Name: fOR Arduino starter kit Button Key Module & LED Board for UNO Raspberry Pi Teensy++
 
Packing list(Does not include Arduino UNO):
 
1 PCS  4 button Board;
1 PCS 6 bit LED Board; 
 
 
 
Description: 
 
Can be inserted directly into Arduino uno mega2560 due,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 Raspberry Pi Teensy etc.) 
 
key board: 
 
 
 
4-button Common Cathode key module .
 
 
2 " GND K1 K2 K3 K4" 4 PIN OUT  2.54mm
 
 
3 Size: 12.7MM x 33MM.
 
led board:
 
1 6 bit RED Common Cathode LEDS.
   
 
 
2 7 PIN OUT 2.54mm
   
 
3 1K ohm Limiting resistor
   
 
4 Power Supply Voltage: 3.3-12V;
   
 
 
5 Size: 17.78MM x 11.43MM.
 
 
 

 

Arduino uno/mega2560 Code
 
//******************************************************//

 /*

Arduino_3key_6led
 
This example code is in the public domain.
*/
 
// Define key pin
int K1 = 13;
int K2 = 12;
int K3 = 11;
int K4 = 10;
// Define led pin
int GND = 6;
int D1 = 5;
int D2 = 4;
int D3 = 3;
int D4 = 2;
int D5 = 1;
int D6 = 0;
 
// 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);
 
// initialize the leds pin as an output.
pinMode(GND, OUTPUT);
pinMode(D1, OUTPUT);
pinMode(D2, OUTPUT);
pinMode(D3, OUTPUT);
pinMode(D4, OUTPUT);
pinMode(D5, OUTPUT);
pinMode(D6, OUTPUT);
 
//Activate key pin internal pull-up resistors
digitalWrite(K1, HIGH);
digitalWrite(K2, HIGH);
digitalWrite(K3, HIGH);
digitalWrite(K4, HIGH);
 
 
//as LED GND
digitalWrite(GND, LOW);
}
 
// the loop routine runs over and over again forever:
void loop() {
 
 
buttonState = digitalRead(K1);
digitalWrite(D1, buttonState); //
 
buttonState = digitalRead(K2);
digitalWrite(D2, buttonState); //
 
buttonState = digitalRead(K3);
digitalWrite(D3, buttonState); //
 
buttonState = digitalRead(K4);
digitalWrite(D4, buttonState); //
 
 
digitalWrite(D5, HIGH); // turn the LED on (HIGH is the voltage level)
digitalWrite(D6, HIGH); // turn the LED on (HIGH is the voltage level)
 
 
}
 
    
 //******************************************************//
View full details