Problem trying to use led driver together with time clock and OLED screen

Hello everyone,

I am trying to connect a DS1307 time clock, an SSD1306_128X32 OLED screen and an P9813 led driver with my arduino mega. If I use only the the time clock and the screen, my code runs ok. But when I add also the led driver, arduino freezes after several steps of execution. I haven’t managed to locate the error yet. Any help it would be appreciated. My code is:

// RTC DS1307-------------------------------------------------------------------------------------
#include "RTClib.h"
RTC_DS1307 rtc;
#include <OneWire.h> 
#include <DallasTemperature.h>  // DS18B20
#define DS18B20_PIN 11
OneWire oneWire(DS18B20_PIN);        
DallasTemperature sensors(&oneWire); 

//RGB-----------------------------------------------------------------------------------------
#include "RGBdriver.h"
#define CLK 13
#define DIO 12
RGBdriver Driver(CLK,DIO);
int R=0;
int G=0;
int B=0;
int m=20; // metriths
//int k=0;

//u8g2----------------------------------------------------------------------------------------
#include <Arduino.h>
#include <Wire.h>
#include <U8g2lib.h>
U8G2_SSD1306_128X32_UNIVISION_2_HW_I2C u8g2(U8G2_R0,SCL,SDA,U8X8_PIN_NONE); 

//---------------------------------------------------------------------------------------------
int Xronos[]={23,59,59,0,0,0,0}; //Xronos

void setup () {
Serial.begin(9600);
Wire.begin();

// DS1307-------------------------------------------------------------------------------------
 rtc.begin();
  // following line sets the RTC to the date & time this sketch was compiled
  // rtc.adjust(DateTime(F(_DATE_), F(_TIME_)));
  // This line sets the RTC with an explicit date & time, for example to set
  // January 21, 2014 at 3am you would call:
  //rtc.adjust(DateTime(2020, 4, 25, 2, 0, 0));
sensors.begin();  // DS18B20 start

 //RGB-----------------------------------------------------------------------------------------
Driver.begin();
Driver.SetColor(0, 0, 0); 
Driver.end();
delay(500);

//Fan-----------------------------------------------------------------------------------------
pinMode(10,OUTPUT);

//u8g2----------------------------------------------------------------------------------------
u8g2.begin();
u8g2.clearBuffer();
u8g2.clearDisplay();
}

void loop () {
Ora();  
Screen(); 
Fan();
Ledstrip(); 
}

void Ora() {
DateTime now = rtc.now();
sensors.requestTemperatures(); 
Xronos[0]=now.hour();
Xronos[1]=now.minute();
Xronos[2]=now.second();
Xronos[6]=sensors.getTempCByIndex(0); 
delay (150);
Serial.print(Xronos[0]);
Serial.print("---");
Serial.print(Xronos[1]);
Serial.print("---");
Serial.print(Xronos[2]);
Serial.print("---");
Serial.print(Xronos[3]);
Serial.print("---");
Serial.print(Xronos[4]);
Serial.print("---");
Serial.print(Xronos[5]);
Serial.print("---");
Serial.println(Xronos[6]);
if (Xronos[6]==(-127)){Xronos[6]=0;}
}

void Screen(){
u8g2.clearBuffer();  
int mo=((R+G+B)*100)/765;  
u8g2.firstPage();
  do {
u8g2.setFont(u8g2_font_6x13_te );
u8g2.drawStr(76,32,"RGB:"); 
u8g2.setCursor(100,32);
u8g2.setFont(u8g2_font_fur11_tf);
u8g2.print(mo,DEC);
u8g2.print("%"); 
u8g2.setCursor(86,15);
u8g2.print(Xronos[6]);
u8g2.drawGlyph(106,15,0X00b0);
u8g2.drawStr(112, 15,"C");   
u8g2.setFont(u8g2_font_fur20_tf);
  char buffer1[5];
  sprintf(buffer1, "%02d:%02d", Xronos[1], Xronos[2] );
u8g2.setCursor(0,26);
u8g2.print(buffer1);
  } while ( u8g2.nextPage() );
  delay(100);
u8g2.sendBuffer();  ;
 } 

void Ledstrip() {
if (Xronos[2]==0 || Xronos[2]==20 ||  Xronos[2]==40){
R=(R+m);
Xronos[3]=R;
  Driver.begin();
  Driver.SetColor(Xronos[3], Xronos[4], Xronos[5]);
  Driver.end();
delay(100);
} 
if (R>255){R=0;}  
//
}

void Fan(){
 if (Xronos[6]>24) {
 digitalWrite(10, HIGH);
 delay(150);
  }
  else
  {digitalWrite(10, LOW);} 
   }