Incrémentation affichage digit 7 segment

Bonsoir, j'ai écris le code ci-dessous selon ton organigramme.

byte sevenSegmentPins[] = {2,3,4,5,6,7,8}; 
int count = 0;
int A, B, C, D, lum;
int capteur =A0;
byte sevenSegment[10][7] =
{
//a b c d e f g
{ 0,0,0,0,0,0,1 }, // = 0
{ 1,0,0,1,1,1,1 }, // = 1
{ 0,0,1,0,0,1,0 }, // = 2
{ 0,0,0,0,1,1,0 }, // = 3
{ 1,0,0,1,1,0,0 }, // = 4
{ 0,1,0,0,1,0,0 }, // = 5
{ 0,1,0,0,0,0,0 }, // = 6
{ 0,0,0,1,1,1,1 }, // = 7
{ 0,0,0,0,0,0,0 }, // = 8
{ 0,0,0,1,1,0,0 } // = 9
};
void setup()
{
for(int i=0; i<7; i++) {
pinMode(sevenSegmentPins[i], OUTPUT);
}
  segmentWrite(count);
}

//fonction pour écrire le nombre sur l'afficheur
void segmentWrite(byte digit)
{
byte pin = 2;
for (byte i=0; i<7; i++) {
digitalWrite(pin, sevenSegment[digit][i]);
++pin;
}
}

void loop()
{
  lum = analogRead(capteur);
  if(lum<100) // Si la valeur est inférieur à 100, laser interrompu 
    {
      Serial.println("Le laser a été interrompu");
      lum = analogRead(capteur);
      while(lum<100) // si le laser n'est pas rétabli
        {
          Serial.println("Le laser est TOUJOURS interrompu");
          lum = analogRead(capteur);
        }
      count++;
      if(count==10) {
        clignote();
          count =0;
      }
      segmentWrite(count);
    }

}

void clignote() // Afficher 1 puis 0 pendant 3 secondes
{
 count = 10;
 A=10%10;
 B=int(A);
 C=10/10;
 D=int(C);
int t=3;
 while(t>0)
 {
 segmentWrite(C);
 delay(500);
 segmentWrite(B);
 delay(500);
 t--;
 }
 
}