create an array with raw data

using the IRremote libray i m having a few problems in storing the raw data inside an array to use after

this is the code from which i receive correct raw data but i tryed a few strategy to store them but i m not able

i left an empy function Store(); if someone have any idea how to do it

later i ll add a button matrix to store a few raw values like power, channel + -, volume + - ecc ecc

#include <IRremote.h>

//objects
IRrecv irrecv(11);
decode_results  results;
IRsend irsend; //pin 3
int buttonPin = 2;
boolean state;
int khz = 38; //how to know the correct value? google?


//Raw data to store
//.....


void  setup () {

  Serial.begin(9600);
  irrecv.enableIRIn();
  pinMode(buttonPin, INPUT_PULLUP);

  delay(1000);
  Serial.println("READYYYY");

}

void  loop () {

  if (irrecv.decode(&results)) {
    Info(&results);
    Code(&results);
    irrecv.resume();
    Serial.println("");
  }

  Store();

  Send();

}

void  Info (decode_results *results) {

  Serial.print("Code      : ");
  ircode(results);
  Serial.print(" (");
  Serial.print(results->bits, DEC);
  Serial.println(" bits)");

}

void  ircode (decode_results *results) {
  Serial.print(results->value, BIN);
}

void  Code (decode_results *results) {

  Serial.print("rawData[");
  Serial.print(results->rawlen - 1, DEC);
  Serial.print("] = {");

  for (int i = 1;  i < results->rawlen;  i++) {
    Serial.print(results->rawbuf[i] * USECPERTICK, DEC);
    if ( i < results->rawlen - 1 ) Serial.print(",");
    if (!(i & 1))  Serial.print(" "); // ',' not needed on last one
  }
  Serial.println("};");
}


void Store() {


}


void Send() {

  state = !digitalRead(buttonPin);
  if (state) {
    //  irsend.sendRaw(irSignal, sizeof(irSignal) / sizeof(irSignal[0]), khz);
  }
}

Store them where? In FLASH? To do that you have to copy the stuff you are printing in Code() and paste that into your sketch as 'const unsigned int ArrayName[] PROGMEM = {'. You will also need to copy the data from FLASH to an array in SRAM before you pass the array to irSend(). Either that or modify the IRremote library to accept a PROGMEM pointer.

in red the edits

a raw code is too big for storing a few of them in sram?

ok now i understand why to put them in flash memory, but i thit that i didn understand this:

Note: Flash (PROGMEM) memory can only be populated at program burn time. You can’t change the values in the flash after the program has started running.

i will need to store this variables while the program is running, there are two part of the sketch, the first one register and store the value and the second one send it

this is a tipical raw:

unsigned int irSignal[] = {9000, 4500, 560, 560, 560, 560, 560, 1690, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 1690, 560, 1690, 560, 560, 560, 1690, 560, 1690, 560, 1690, 560, 1690, 560, 1690, 560, 560, 560, 560, 560, 560, 560, 1690, 560, 560, 560, 560, 560, 560, 560, 560, 560, 1690, 560, 1690, 560, 1690, 560, 560, 560, 1690, 560, 1690, 560, 1690, 560, 1690, 560, 39416, 9000, 2210, 560};

const unsigned int ArrayName[] PROGMEM = {'.

i had difficults to put the raw inside an array but i didn t use this memory and to be honest is the first time that i read about progmem so today i will try to use it, hoping to have it working

i am trying this kinf of approach:
const unsigned int raw1[] PROGMEM = {results->rawbuf * USECPERTICK};
it looks working, but i m not sure[/color]
> You will also need to copy the data from FLASH to an array in SRAM before you pass the array to irSend()
sorry, i don t understood this, before i put the rawcode inside flash memory and then i put it back in sram?
now i understand why, silly question. but i am having problem to access it