|
|
#include <IRremote.h>
int RECV_PIN=6;
IRrecv irrecv(RECV_PIN);
IRsend irsend;
decode_results results;
unsigned long date;
unsigned int rawCodes_Open_Close[26]={-25450, 2400, -550, 1250, -500, 650, -550, 1250, -500, 650, -550, 1250, -550, 600, -550, 650, -550, 1250, -500, 650, -550, 650, -550, 600, -550, 650};
void setup()
{
Serial.begin(9600);
irrecv.enableIRIn();
}
void loop(){
if (irrecv.decode(&results)){
Serial.println("Open_Close1");
for(int i = 0 ;i < 3 ; i ++){
irsend.sendSony(0xa90, 12); //
// irsend.sendRaw(rawCodes_Open_Close,26, 38);
delay(100);
}
Serial.println("Open_Close2");
irrecv.resume();
}
}
对着接收器按遥控器,按N次也只输出一次Open_Close1 和 一次 Open_Close2? 这是为什么呢? |
|