#include <IRremote.h>
#include <Servo.h>

unsigned long Value1 = 0xFFA05F;
unsigned long Value2 = 0xFF50AF;
unsigned long Value3 = 0xFF807F;
unsigned long Value4 = 0xFF609F;

int RECV_PIN = 11;
IRrecv irrecv (RECV_PIN);
decode_results results;
Servo servo1;
Servo servo2;

void setup() {
  Serial.begin(9600);
  servo1.attach(10);
  servo2.attach(9);
}

void loop() {
  if (irrecv.decode(&results)) {
    Serial.println(results.value, HEX);
    irrecv.resume();
  }
  if (results.value == Value1) {

    servo1.write(160);
  }
  else if (results.value == Value2) {

    servo1.write(70);
  }
  else if (results.value == Value3) {

    servo2.write(70);
  }
  else if (results.value == Value4) {

    servo2.write(160);
  }
}