Arduino 紅外無線遙控器

HK$30.00

貨號: arduino-ir-remote-control-receiver-kit 分類:

.商品規格:
尺寸:80*60*40mm
重量:70g
電池:CR2025 紐扣電池
發射距離:8米
有效角度:60度
 
 
.商品包含:
1 x 38KHz 紅外無線遙控器
1 x 38KHz 紅外無線接收器
1 x 3pin 杜拜線

 

 

・示範短片:

 

 

・程式範例:

#include <IRremote.h>     
int RECV_PIN =6;     
int bluePin = 11;     
int greenPin = 10;        
int redPin = 9;     
IRrecv irrecv(RECV_PIN);     
decode_results results;     
void setup(){     
 Serial.begin(9600);     
 irrecv.enableIRIn();     
 pinMode(redPin, OUTPUT);     
 pinMode(greenPin, OUTPUT);     
   pinMode(bluePin, OUTPUT);     
}     
void loop(){     
   if (irrecv.decode(&results)){     
int value = results.value;     
Serial.println(value);      
       switch(value){     
         case 12495: //Keypad button "1"     
         //set color red     
         analogWrite(redPin, 0xFF);     
         analogWrite(greenPin,0x08);     
         analogWrite(bluePin, 0xFB);     
         }     
       switch(value){     
         case -7177: //Keypad button "2"     
         //set color skyblue     
         analogWrite(redPin, 0x00);     
         analogWrite(greenPin,0xFF);     
         analogWrite(bluePin, 0xFF);     
         }     
         switch(value){     
         case 539: //Keypad button "3"     
          //set color pink     
         analogWrite(redPin, 0x1F);     
         analogWrite(greenPin,0x00);     
         analogWrite(bluePin, 0x8F);     
         }     
         switch(value){     
         case 25979: //Keypad button "4"     
         //set color light green     
         analogWrite(redPin, 0x11);     
         analogWrite(greenPin,0x5F);     
         analogWrite(bluePin, 0x01);     
         }     
       irrecv.resume();      
   }     
}  

 

重量 70 g
尺寸 80 × 60 × 40 mm

商品評價

目前沒有評價。

搶先評價 “Arduino 紅外無線遙控器”

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *

購物車
Scroll to Top