#include <IRremote.h>
const int SEND_PIN = 3;
const int RECV_PIN = 2;
IRrecv irrecv(RECV_PIN);
IRsend irsend;
decode_results results;
int key_value;

void setup() {
  pinMode(SEND_PIN, OUTPUT);
  Serial.begin(9600);
  Serial.println("Ready, when you are!");
  irrecv.enableIRIn();
  irrecv.blink13(true);

  pinMode(7, INPUT_PULLUP); // button
}

void loop() {
if (digitalRead(7) == LOW){
      irsend.sendSony(0x880084c, 32);  // change these unique code to yours but in decimal 
      delay(30);
      Serial.println("test");
      }

  /*if (irrecv.decode(&results)) {
    if (results.value == 0XFFFFFFFF)
      results.value = key_value;

    switch (results.value & ~0x800) {
      case 0xC:
        Serial.println("POWER");
        irsend.sendSony(0x880084c, 32);
        irsend.sendSAMSUNG(0xE0E06798, 32);
        irsend.sendSAMSUNG(0xE0E06798, 32);
        irsend.sendSAMSUNG(0xE0E040BF, 32);
        Serial.println("---sent---");
        break;
      case 0x1:
        Serial.println("1");
        break;
      case 0x2:
        Serial.println("2");
        break;
      case 0x3:
        Serial.println("3");
        break;
      case 0x4:
        Serial.println("4");
        break;
      case 0x5:
        Serial.println("5");
        break;
      case 0x6:
        Serial.println("6");
        break;
      case 0x7:
        Serial.println("7");
        break;
      case 0x8:
        Serial.println("8");
        break;
      case 0x9:
        Serial.println("9");
        break;
      case 0x0:
        Serial.println("0");
        break;
      case 0x31:
        Serial.println("FAV");
        break;
      case 0x3C:
        Serial.println("TXT");
        break;
      case 0x37:
        Serial.println("RED");
        break;
      case 0x36:
        Serial.println("GREEN");
        break;
      case 0x32:
        Serial.println("YELLOW");
        break;
      case 0x34:
        Serial.println("BLUE");
        break;
      case 0x25:
        Serial.println("GUIDE");
        break;
      case 0x33:
        Serial.println("?");
        break;
      case 0x1B:
        Serial.println("EXIT");
        break;
      case 0x19:
        Serial.println("MENU");
        break;
      case 0x22:
        Serial.println("BACK");
        break;
      case 0x1D:
        Serial.println("TOOLS");
        break;
      case 0xF:
        Serial.println("@");
        break;
      case 0x35:
        Serial.println("OK");
        break;
      case 0x16:
        Serial.println("UP");
        break;
      case 0x13:
        Serial.println("LEFT");
        break;
      case 0x12:
        Serial.println("RIGHT");
        break;
      case 0x17:
        Serial.println("DOWN");
        break;
      case 0x10:
        Serial.println("Vol_UP");
        break;
      case 0x11:
        Serial.println("Vol_DOWN");
        break;
      case 0x38:
        Serial.println("SRC");
        break;
      case 0xD:
        Serial.println("MUTE");
        break;
      case 0x20:
        Serial.println("PR_UP");
        break;
      case 0x21:
        Serial.println("PR_DOWN");
        break;
      default:
        Serial.println("New Input:");
        Serial.println(results.value);
    }
    key_value = results.value;
    irrecv.resume();

  }*/
}