IRremote for my 8x8x8 led cube on the mega

Lots of reading and searching but I got the sketch to compile without any errors.
I changed the boarddefs.h file where you can state which timer for which processor you want to use.
I know that TIMER2 is an 8bit and the rest are 16bit timers. I changed it to the option TIMER1.

Only problem is that I still cant seem to recieve any ir signals using the serial monitor. Im using a pronto remote with codes that did work with the Uno with the same IR reciever.

On the Mega Im using pin D21 dont know if that also has to be changed in the IRremote libary files ? :confused:

#define dim 20
#define IRactive 39
#define IRpin 21
IRrecv irrecv(IRpin);
decode_results IRresults;

int current_effect;
int digit;
int auto_run;
int run_speed;
int run_time;

volatile unsigned char cube[8][8];
volatile int current_layer = 0;

void setup()
{
  digit = 0;
  
  pinMode(dim,OUTPUT);
  pinMode(IRactive,OUTPUT);
  pinMode(IRpin, INPUT);

  
  Serial.begin(9600);
  irrecv.enableIRIn(); // Start the IR receiver

and

void loop()  //ALL VISUAL EFFECTS ARE STARTED FROM HERE
{
 if (irrecv.decode(&IRresults)) { 
    Serial.println(IRresults.value, DEC); // Print the Serial 'results.value'
    irrecv.resume();   // Receive the next value
 }

Thankx for your time ......

Ronald

p.s.
updated .ino file and the IR libary used (unchanged) added below

z3t0-Arduino-IRremote-2.1.0-96-g2dc97b2.zip (84.7 KB)

Roon_cube_Mega.ino (24 KB)

boarddefs.h (19 KB)