#include <IRremote.h>
char IRPIN = 11;
const int SEND_PIN = 3;
IRsend irsend;
decode_results results;
void setup()
{
Serial.begin(9600);
//irrecv.enableIRIn();
Serial.println("Enabling IRin");
IrReceiver.begin(IRPIN, ENABLE_LED_FEEDBACK);
Serial.println("Enabled IRin");
pinMode(7, INPUT_PULLUP); // button
pinMode(SEND_PIN, OUTPUT);
}
void loop()
{
if (digitalRead(7) == LOW){
irsend(DD22FF00, 32); // change these unique code to yours but in decimal
delay(30);
Serial.println("test");
}
if (IrReceiver.decode())
{
Serial.println(IrReceiver.decodedIRData.decodedRawData, HEX);
IrReceiver.resume();
}
/*if (IrReceiver.decode(&results))
switch (IrReceiver.decode(&results))
{
case DD22FF00:
println("test");
break;
}
delay(500);*/
}