Delete comment from: Ken Shirriff's blog
Hello,
On irsend.sendNEC is hung, on serial is working. Where is the mistake ?
#include
int receiver = 11;
IRrecv irrecv(receiver);
decode_results results;
IRsend irsend;
void setup()
{
//Serial.begin(9600);
irrecv.enableIRIn();
}
void translateIR() // takes action based on IR code received
{
switch(results.value)
{
//case 0x20DF40BF: Serial.println(0xAAAAAAAA, HEX); break;
//case 0x20DFC03F: Serial.println(0xBBBBBBBB, HEX); break;
//case 0x20DF906F: Serial.println(0xBBBBBBBB, HEX); break;
case 0x20DF40BF: irsend.sendNEC(0x10EF58A7, 32); break;
case 0x20DFC03F: irsend.sendNEC(0x10EF708F, 32); break;
case 0x20DF906F: irsend.sendNEC(0x10EF08F7, 32); break;
}
delay(100);
}
void loop()
{
if (irrecv.decode(&results)) // have we received an IR signal?
{
translateIR();
{
irrecv.resume(); // receive the next value
}
}
}
Dec 17, 2013, 10:54:04 AM
Posted to A Multi-Protocol Infrared Remote Library for the Arduino

