Controll Air Conditioner by IR light issue

I build some project with arduino uno that need to store A/C remote codes and execute them on demand.
Something like IR sender. Hard thing is long A/C codes that is needing to be read raw and after that it need to transmit it raw.

It working perfectly when im using only two commands
unsigned ONCOLD16CAUTO ={};
unsigned OFF ={};
(power on, power off) but i need to store around 60 commands.

These IR commands use too many Sram and i dont know what to doo.
Any solution for me?

// Circuit description: Arduino UNO, PIN3 are connected to IR led with resistor 150ohm in series.

here is my scetch:

#include "IRremote.h"

IRsend irsend;

void setup()
{
  Serial.begin(9600);
  pinMode(7, INPUT_PULLUP);
  pinMode(6, INPUT_PULLUP);
  pinMode(13, OUTPUT);
  digitalWrite(13, LOW);
}

int khz=38; //NB Change this default value as neccessary to the correct modulation frequency
// ON and 2O C° with 1 FAN heat
unsigned ONCOLD16CAUTO[] ={8972,4480,560,1664,556,1664,556,540,556,540,560,536,560,540,556,1664,556,1664,560,1660,560,1660,560,1664,556,540,556,540,556,540,560,536,560,1664,556,540,556,540,560,536,560,540,556,540,560,1664,556,1664,556,1664,556,540,556,540,556,540,560,536,560,540,556,540,560,536,560,540,556,540,556,540,560,540,556,540,556,540,560,1664,556,540,556,1664,556,540,560,536,560,540,556,540,556,540,560,536,560,540,556,540,556,540,560,540,556,540,556,540,560,536,560,1664,556,540,556,540,560,536,560,540,556,540,560,536,560,540,556,540,556,540,560,536,560,540,556,540,560,536,560,540,556,540,556,540,560,540,556,540,556,540,560,536,560,540,556,540,560,536,560,540,556,540,556,540,560,536,560,540,556,540,560,536,560,540,556,540,556,540,560,540,556,1664,556,540,560,1660,560,536,560,540,556,540,556,540,560,540,556,1664,556,1664,556,1664,556,1664,556,540,560,1664,556,1664,556,1664,584}; 
unsigned OFF[] ={8972,4480,560,1664,556,1664,556,540,556,540,560,536,560,540,556,1664,556,1664,560,1660,560,1660,560,1664,556,540,556,540,556,540,560,536,560,1664,556,540,556,540,560,536,560,540,556,540,560,1664,556,1664,556,1664,556,540,556,540,556,540,560,536,560,540,556,540,560,536,560,540,556,540,556,540,560,540,556,540,556,540,560,1664,556,540,556,1664,556,540,560,536,560,540,556,540,556,540,560,536,560,540,556,540,556,540,560,540,556,540,556,540,560,536,560,1664,556,540,556,540,560,536,560,540,556,540,560,536,560,540,556,540,556,540,560,536,560,540,556,540,560,536,560,540,556,540,556,540,560,540,556,540,556,540,560,536,560,540,556,540,560,536,560,540,556,540,556,540,560,536,560,540,556,540,560,536,560,540,556,540,556,540,560,540,556,1664,556,540,560,1660,560,536,560,540,556,540,556,540,560,540,556,1664,556,1664,556,1664,556,1664,556,540,560,1664,556,1664,556,1664,584};


int dugme1=0;  //ON
int dugme2=0;  //OFF

void loop() {

dugme1=digitalRead(7);
dugme2=digitalRead(6);

if (!dugme1){         //SEND COMMAND ON 16*C, AUTOFAN
  
digitalWrite(13,HIGH);  
irsend.sendRaw(ONCOLD16CAUTO, sizeof(ONCOLD16CAUTO)/sizeof(int), khz);
delay(1000);


}
else if (!dugme2){    //SEND COMMAND OFF 
  digitalWrite(13,HIGH);  
  irsend.sendRaw(OFF, sizeof(OFF)/sizeof(int), khz);
  delay(1000);
    }
else {
  digitalWrite(13,LOW);
  }
    
}
const unsigned ONCOLD16CAUTO[] PROGMEM ={8972,4480,560,1664,556,1664,556,540,556,540,560,536,560,540,556,1664,556,
1664,560,1660,560,1660,560,1664,556,540,556,540,556,540,560,536,560,1664,
556,540,556,540,560,536,560,540,556,540,560,1664,556,1664,556,1664,556,540,
556,540,556,540,560,536,560,540,556,540,560,536,560,540,556,540,556,540,560,
540,556,540,556,540,560,1664,556,540,556,1664,556,540,560,536,560,540,556,
540,556,540,560,536,560,540,556,540,556,540,560,540,556,540,556,540,560,
536,560,1664,556,540,556,540,560,536,560,540,556,540,560,536,560,540,556,
540,556,540,560,536,560,540,556,540,560,536,560,540,556,540,556,540,560,
540,556,540,556,540,560,536,560,540,556,540,560,536,560,540,556,540,556,
540,560,536,560,540,556,540,560,536,560,540,556,540,556,540,560,540,556,
1664,556,540,560,1660,560,536,560,540,556,540,556,540,560,540,556,1664,
556,1664,556,1664,556,1664,556,540,560,1664,556,1664,556,1664,584};

const unsigned OFF[] PROGMEM ={8972,4480,560,1664,556,1664,556,540,556,540,560,536,560,540,556,1664,
556,1664,560,1660,560,1660,560,1664,556,540,556,540,556,540,560,536,560,
1664,556,540,556,540,560,536,560,540,556,540,560,1664,556,1664,556,1664,
556,540,556,540,556,540,560,536,560,540,556,540,560,536,560,540,556,540,
556,540,560,540,556,540,556,540,560,1664,556,540,556,1664,556,540,560,
536,560,540,556,540,556,540,560,536,560,540,556,540,556,540,560,540,556,
540,556,540,560,536,560,1664,556,540,556,540,560,536,560,540,556,540,
560,536,560,540,556,540,556,540,560,536,560,540,556,540,560,536,560,540,
556,540,556,540,560,540,556,540,556,540,560,536,560,540,556,540,560,536,
560,540,556,540,556,540,560,536,560,540,556,540,560,536,560,540,556,540,
556,540,560,540,556,1664,556,540,560,1660,560,536,560,540,556,540,556,
540,560,540,556,1664,556,1664,556,1664,556,1664,556,540,560,1664,556,
1664,556,1664,584};

Then you just need to add a version of sendRaw() that takes a pointer to PROGMEM and uses the right function to fetch the integers from FLASH. Call it sendRaw_p() to match convention.

See: PROGMEM - Arduino Reference

Dear Sir, than you for helping me.

Wondering are i need to change library?
I think function sendRaw() is called from library IRremote.h ?

In library IRremote.h found onlu these:

#endif

 void  custom_delay_usec (unsigned long uSecs);
 void  enableIROut (int khz) ;
 void  mark         (unsigned int usec) ;
 void  space       (unsigned int usec) ;
 void  sendRaw     (const unsigned int buf[],  unsigned int len,  unsigned int hz) ;

Then you just need to add a version of sendRaw() that takes a pointer to PROGMEM and uses the right function to fetch the integers from FLASH. Call it sendRaw_p() to match convention.

Is this corect:

void  sendRaw_p (const unsigned int buf[] PROGMEM, unsigned int len, unsigned int hz);

Done, all what im needed are described on www.analisir.com blog is “Sending long AC Signals from Flash with IRremote”

These guys also have a pc windows software that i buyed yesterday, that give you completely picture how capture ir signal looks like, where is a noise, posibility to export captured signal directly to arduino code in format that IRremote.h understand etc…

I sucesfuly write 10 A/C raw signals, every signal contains 210 bit data, and after compiling scetch on bottom of arduino there is a message:

Sketch uses 13580 bytes (42%) of program storage space. Maximum is 32256 bytes.
Global variables use 476 bytes (23%) of dynamic memory, leaving 1572 bytes for local variables. Maximum is 2048 bytes.

With 10 AC raw commands im using 42% of FLASH memory, i can add another 10 to 15 and total number of commands will be in best case 25. This is not enought i need to store 60 commands.

Is there a way to store commands to SD?
SD is cheep and have lots of available memory, maybe is slow and arduino can not red it in desired time?