int addr = 0; //for EEPROM
int index = 0; //for array
int mapto = 0; //for mapping
void setup()
{
Serial.begin(9600);
// make pin 2 an input and turn on the
// pullup resistor so it goes high unless
// connected to ground:
pinMode(2, INPUT_PULLUP);
Keyboard.begin();
irrecv.enableIRIn(); // Start the receiver
}
void loop() {
if (irrecv.decode(&results)) {
//Block 1 start
//search from IR_Reveive.h and return index
if(results.value != ir_code_r[0]){
for(int i=0;i<256;i++){
if( results.value== ir_code_r){
index = i;
break;
}
}
}