รหัสสินค้า | SA10012 |
หมวดหมู่ | โมดูล 7 Segment อเนกประสงค์ |
ราคา | 395.00 บาท |
สถานะสินค้า | พร้อมส่ง |
จำนวน | ชิ้น |
The LED Keypad Shield is an Arduino expansion shield with a 4 digit 8 segment digital tube display (common cathode). It has 5 buttons that can be used as menu select buttons or control buttons. It uses I2C to drive the digital tube for an easy user experience.
|
Please install the following libraries for this code to function.
LedKeypad Arduino library About Library installation.
#include <LedKeypad.h>
char brightness =0;
char buf[5]="2456";
void setup() {
ledkeypad.begin(); /*Enable*/
ledkeypad.setBrightness(0);/*Sets the brightness level*/
ledkeypad.display(2015);/*Display data*/
delay(5000);
ledkeypad.display(buf);/*Display character for testing*/
for(int i=0;i<4;i++){/*for testing*/
ledkeypad.dotShow(i);
delay(1000);
ledkeypad.dotVanish(i);
}
}
void loop() {
unsigned char keyValue=0;
keyValue = ledkeypad.getKey();/*Get key value*/
switch(keyValue){
case KEY_DOWN:
buf[0]++;
if(buf[0] > '9')
buf[0] = '0';
ledkeypad.display(0,buf[0]);
break;
case KEY_LEFT:
buf[1]++;
if(buf[1] > '9')
buf[1] = '0';
ledkeypad.display(1,buf[1]);
break;
case KEY_UP:
buf[2]++;
if(buf[2] > '9')
buf[2] = '0';
ledkeypad.display(2,buf[2]);
break;
case KEY_RIGHT:
buf[3]++;
if(buf[3] > '9')
buf[3] = '0';
ledkeypad.display(3,buf[3]);
break;
case KEY_SELECT:
brightness++;
if(brightness > 7)
brightness = 0;
ledkeypad.setBrightness(brightness);
break;
default:
break;
}
}
The sample code is a simple clock for the module. Using the input buttons the time can be adjusted. Key functions are as follows:
button | function |
---|---|
down | The first digital tube +1 |
left | The sencond digital tube +1 |
up | The third digital tube +1 |
right | The fourth digital tube +1 |
select | adjusting brightness |
ชำระเงินค่าสินค้าโดยการโอนเงินเข้าบัญชีธนาคาร KBANK, SCB, BBL,TMB
กรุณาเก็บหลักฐานการโอนเงินของท่านไว้เพื่อแจ้งการชำระเงินด้วยค่ะ
ท่านสามารถแจ้งการชำระเงินผ่านระบบอัตโนมัติได้โดย Click Link ข้างล่างค่ะ
https://www.arduitronics.com/informpayment
หน้าที่เข้าชม | 15,375,197 ครั้ง |
ผู้ชมทั้งหมด | 5,878,275 ครั้ง |
เปิดร้าน | 21 พ.ค. 2556 |
ร้านค้าอัพเดท | 5 ก.ย. 2568 |