久久久久久久999_99精品久久精品一区二区爱城_成人欧美一区二区三区在线播放_国产精品日本一区二区不卡视频_国产午夜视频_欧美精品在线观看免费
標題:
Arduino實現電視盒子的紅外遙控
[打印本頁]
作者:
aing123
時間:
2020-12-25 14:43
標題:
Arduino實現電視盒子的紅外遙控
#include <Keypad.h>
#include<IRremote.h>
IRsend irsend;
const byte ROWS = 4; //four rows
const byte COLS = 4; //four columns
//define the cymbols on the buttons of the keypads
char hexaKeys[ROWS][COLS] = {
{'1','2','3','A'},
{'4','5','6','B'},
{'7','8','9','C'},
{'*','0','#','D'}
};
byte rowPins[ROWS] = {11,10, 9, 8}; //connect to the row pinouts of the keypad
byte colPins[COLS] = {7, 6, 5,4}; //connect to the column pinouts of the keypad
//initialize an instance of class NewKeypad
Keypad keypad = Keypad( makeKeymap(hexaKeys), rowPins, colPins, ROWS, COLS);
void setup(){
Serial.begin(9600);
}
void loop(){
char key = keypad.getKey();
if(key){
Serial.println(key);
}
keypad.getState();//鍵盤字符串實現
if( key== '#'){
irsend.sendNEC(0x807F3BC4,32);}
if(key== '1') {
irsend.sendNEC(0x807F53AC,32); }
if(key== 'A'){
irsend.sendNEC(0x807F738C ,32); }
if(key== '2'){
irsend.sendNEC(0x807F4BB4,32); }
if(key== '3'){
irsend.sendNEC(0x807F9966,32);}
if(key=='4'){
irsend.sendNEC(0x807F837C,32); }
if(key=='D'){
irsend.sendNEC(0x807F11EE,32); }
if(key=='B'){
irsend.sendNEC(0x807FA956,32); }
if(key=='C'){
irsend.sendNEC(0x807FA35C,32); }
if(key=='5'){
irsend.sendNEC(0x807F49B6,32); }
}
//發射管帶330歐接3
歡迎光臨 (http://www.zg4o1577.cn/bbs/)
Powered by Discuz! X3.1
主站蜘蛛池模板:
欧美v片
|
丁香久久
|
欧洲免费视频
|
欧美精品一区二区蜜桃
|
国产精品久久久久久久久久软件
|
亚洲精品久久久9婷婷中文字幕
|
在线观看国产三级
|
国产综合在线视频
|
www.99热
|
久久久中文
|
免费污视频
|
www.亚洲一区
|
欧美 日韩 国产 成人
|
天堂男人av
|
天天综合网天天综合色
|
日韩免费在线
|
日韩一区二区在线看
|
日韩精品久久
|
国产精品久久av
|
亚洲一区二区欧美
|
日韩一区三区
|
久久国产福利
|
在线免费国产
|
久久精品亚洲精品
|
亚洲欧洲成人
|
精品欧美一区二区精品久久久
|
成人1区2区
|
日韩aⅴ在线观看
|
一区二区三区四区在线
|
欧美成人第一页
|
午夜影视在线观看
|
日韩中文视频
|
成人亚洲网
|
成人教育av
|
日本一区高清
|
伊人久久在线观看
|
中文字幕av网
|
欧美视频xxx
|
黄色一级电影在线观看
|
国产成人精品av
|
国产精品视频免费看
|