sortir d'une boucle while

#include <IRremote.h>
#include <IRremoteInt.h>


//Pin connectée au ST_cp of 74hc595
int latchPin = 11;
//Pin connectée au sh_cp of 74HC595
int clockPin = 12;
//Pin connecté au DS 74Hc595
int dataPin = 10;
const int digitPins[4] = {2, 3, 4, 5};
const int nombre[10] = {192, 249, 164, 176, 153, 146, 130, 248, 128, 144};


const char IR = 8;
IRrecv monRecepteurIR(IR);
decode_results messageRecu;

int digitScan = 0;
int digitBuffer[4] = {0};

int temps = 0;
int temps_2 = 0;

volatile boolean tourne;

void setup() {
  // put your setup code here, to run once:
 Serial.begin(9600);
    monRecepteurIR.enableIRIn();
    monRecepteurIR.blink13(true);

      for (int i = 0; i < 4; i++)
  {
    pinMode(digitPins[i], OUTPUT);//mes tous les digit en sortie
  }
  pinMode(latchPin, OUTPUT);
  pinMode(clockPin, OUTPUT);
  pinMode(dataPin, OUTPUT);
  
  pinMode(IR , INPUT);

   


   
}

void affichage() {
  for (byte j = 0; j < 4; j++) {
    digitalWrite(digitPins[j], LOW);
    digitalWrite(latchPin, LOW);
    shiftOut(dataPin, clockPin, MSBFIRST, B11111111);
    digitalWrite(latchPin, HIGH);

    delayMicroseconds(100);
    digitalWrite(digitPins[digitScan], HIGH);

    digitalWrite(latchPin, LOW);
    if (digitScan == 2)
    {
      shiftOut(dataPin, clockPin, MSBFIRST, (nombre[digitBuffer[digitScan]] | B10000000));
    }
    else
      shiftOut(dataPin, clockPin, MSBFIRST, nombre[digitBuffer[digitScan]]);
  }
  digitalWrite(latchPin, HIGH);
  digitScan++;
  if (digitScan > 3)
  {
    digitScan = 0;
  }
}

void minute_seconde()
{

   temps = (millis()  / 1000);
      temps_2 = (millis() / 60000);
      if (millis() > 5000)
      {
        temps %= 60;
        temps_2 %= 60;
      }

      digitBuffer[3] = temps_2 / 10;
      digitBuffer[2] = temps_2 % 10;
      digitBuffer[1] = temps / 10;
      digitBuffer[0] = temps % 10;
      affichage();


      delay(2);
  
}
void heure_minute()
{
  while(tourne)
  {
   temps = (millis()  / 60000);
      temps_2 = (millis() / 3600000);
      if (millis() > 5000)
      {
        temps %= 60;
        temps_2 %= 60;
      }

      digitBuffer[3] = temps_2 / 10;
      digitBuffer[2] = temps_2 % 10;
      digitBuffer[1] = temps / 10;
      digitBuffer[0] = temps % 10;
      affichage();


      delay(2);
      if(monRecepteurIR.decode(&messageRecu))
{
 if(messageRecu.value != 0xFF18E7)
 {
  Serial.println("ça marche");
  }
}
  
  
}
}

void loop() {
  // put your main code here, to run repeatedly:

 
if(monRecepteurIR.decode(&messageRecu))
{
  tourne = false;
  
  
 
    switch(messageRecu.value)
    {
      case 0xFF30CF:
      tourne = true;
       minute_seconde();
        Serial.println("touche1");
        
        
        break;
      case 0xFF18E7:
      tourne = true;
      heure_minute();
      
        Serial.println("touche2");
        
        break;  
        
      }
  monRecepteurIR.resume();
}
}

je test la librairie et le code que tu ma donné a de suite

c'est la même librairie que moi la le code marche j'ai une reception
je vais essayer d'ajouter un else pour voir

même avec le else ça marche

#include <IRremote.h>



//Pin connectée au ST_cp of 74hc595
int latchPin = 11;
//Pin connectée au sh_cp of 74HC595
int clockPin = 12;
//Pin connecté au DS 74Hc595
int dataPin = 10;
const int digitPins[4] = {2, 3, 4, 5};
const int nombre[10] = {192, 249, 164, 176, 153, 146, 130, 248, 128, 144};


const char IR = 8;
IRrecv irrecv(IR);
decode_results results;

int digitScan = 0;
int digitBuffer[4] = {0};

int temps = 0;
int temps_2 = 0;

volatile boolean tourne;

void setup() {
  // put your setup code here, to run once:
 Serial.begin(9600);
    irrecv.enableIRIn();
    irrecv.blink13(true);

      for (int i = 0; i < 4; i++)
  {
    pinMode(digitPins[i], OUTPUT);//mes tous les digit en sortie
  }
  pinMode(latchPin, OUTPUT);
  pinMode(clockPin, OUTPUT);
  pinMode(dataPin, OUTPUT);
  
  pinMode(IR , INPUT);

   


   
}

void affichage() {
  for (byte j = 0; j < 4; j++) {
    digitalWrite(digitPins[j], LOW);
    digitalWrite(latchPin, LOW);
    shiftOut(dataPin, clockPin, MSBFIRST, B11111111);
    digitalWrite(latchPin, HIGH);

    delayMicroseconds(100);
    digitalWrite(digitPins[digitScan], HIGH);

    digitalWrite(latchPin, LOW);
    if (digitScan == 2)
    {
      shiftOut(dataPin, clockPin, MSBFIRST, (nombre[digitBuffer[digitScan]] | B10000000));
    }
    else
      shiftOut(dataPin, clockPin, MSBFIRST, nombre[digitBuffer[digitScan]]);
  }
  digitalWrite(latchPin, HIGH);
  digitScan++;
  if (digitScan > 3)
  {
    digitScan = 0;
  }
}

void minute_seconde()
{
irrecv.resume();

while(1)
{
   temps = (millis()  / 1000);
      temps_2 = (millis() / 60000);
      if (millis() > 5000)
      {
        temps %= 60;
        temps_2 %= 60;
      }

      digitBuffer[3] = temps_2 / 10;
      digitBuffer[2] = temps_2 % 10;
      digitBuffer[1] = temps / 10;
      digitBuffer[0] = temps % 10;
      affichage();


      delay(2);
      if(irrecv.decode(&results)){
        break;
      }
      }
}
  

void heure_minute()
{
  irrecv.resume();
  while(1)
  {
   temps = (millis()  / 60000);
      temps_2 = (millis() / 3600000);
      if (millis() > 5000)
      {
        temps %= 60;
        temps_2 %= 60;
      }

      digitBuffer[3] = temps_2 / 10;
      digitBuffer[2] = temps_2 % 10;
      digitBuffer[1] = temps / 10;
      digitBuffer[0] = temps % 10;
      affichage();


      delay(2);
       if(irrecv.decode(&results)){
        break;
      }
     
    
      
  
}
}

void loop() {
  // put your main code here, to run repeatedly:

  
if(irrecv.decode(&results))
{
  switch(results.value)
     {
      case 0xFF30CF:
        minute_seconde();
        break;
      case 0xFF18E7:
        heure_minute();
        break;  
      }
  irrecv.resume();
}
}

avec ce code un appuie court me fais rentrée dans le while est la je reste bloqué mais un appuie long fait le contraire

mets un delay(500) avant irrecv.resume

Bon y'a des moment ça marche , des moment non
C'est vraiment un problème de réception

problème résolue

voila comment j'ai fait
merci pour l'aide que tu ma apporter @infobarquee

void minute_seconde()
{
    if(irrecv.decode(&results))
    {
      
      test = results.value;
  Serial.println(results.value);
     Serial.println(test);
    irrecv.resume();
    while(results.value == test)
    {
      delay(100);
      
      Serial.println(test);
      
      int i=1259;
      digitBuffer[3] = i / 1000;
      digitBuffer[2] = (i/100) % 10;
      digitBuffer[1] = (i/10)% 10;
      
      digitBuffer[0] = i % 10;
      affichage();


      delay(2);
       if(irrecv.decode(&results))
      {
        irrecv.resume();
        if(results.value !=test)
        {
          break;
        }
      }
    }}
       
}