light sensor

hello , i’m a new user to arduino and i have a little class project, we have to code an arduino card.
I have to do the light sensor in a led display. When the ambiant light is intense the led’s have to be bright and conversely. For this i have in my possession an LDR.
here you have the code or I shall put mine.
Thanks to help me

const char ON_OFF=7;
const char CMD_AMBRE=6;
const char CMD_ROUGE=5;
const char CLK=13;
const char LE=12;
const char SDI=11;
const char PWM_TXT1=9;
const char PWM_TXT2=10;

const char P[24]={0x30,0X48,0x48,0x48,0x7F,0x00,0x3E,0x41,0x41,0x41,0x3E,0x00,0x40,0x40,0x7F,0x40,0x40,0x00,0x26,0x49,0x49,0x49,0x32,0x00};
 
 
void setup() {
   //initialisation des sorties
  pinMode(ON_OFF, OUTPUT);
  pinMode(CMD_ROUGE, OUTPUT);
  pinMode(CMD_AMBRE, OUTPUT);
  pinMode(CLK, OUTPUT);
  pinMode(LE, OUTPUT);
  pinMode(SDI, OUTPUT);
  pinMode(PWM_TXT1, OUTPUT);
  pinMode(PWM_TXT2, OUTPUT);
  digitalWrite(ON_OFF, LOW);
  digitalWrite(CMD_ROUGE, LOW);
  digitalWrite(CMD_AMBRE, HIGH);
  digitalWrite(CLK, LOW);
  digitalWrite(SDI, LOW);
  digitalWrite(LE, LOW);
  analogWrite(PWM_TXT1, 240);// Réglage de la luminisité
  analogWrite(PWM_TXT2, 240);
  
  Serial.begin(9600);

  
  delay(500);
  }

void loop() {
  char Test,i,j;

  for(i=0;i<24;i++){
    for(j=0;j<8;j++) {
      Test=(P[i]>>(7-j))&0x01;
       if (Test==0x01) 
      digitalWrite(SDI,HIGH);
    else  
      digitalWrite(SDI,LOW); 
    digitalWrite(CLK,HIGH);
    digitalWrite(CLK,LOW);
    }
  }
  digitalWrite(LE,HIGH);
  digitalWrite(LE,LOW);
  while(1);
}