Mega output all active on power up !

Hi, for an unknown reason yesterday my output works as program. today, after some little modification, ALL my output start active. the little code added is to activate 4 more ouuput on my 40's output in my sketch !!
i use the "input pullup" code everywhere

// code pour controler un aiguillage de train avec DEL témon selo la position.
// Luc Champagne avec la precieuse contribution de Guillaume Dorczynski. merci
// 2 février 2026
//sur appel le DEL allume et demeure allumé et la sortie relais est activé pour la durée de (temporisation_durée)
//sur appel de la position opposé, les DEL change d'état et le relay associé s'active pendant la (temporisation_durée)
//mcp1 configurer en entrée (16)
//mcp2 configurer en sortie (16)

#include <Adafruit_MCP23X17.h>
#include <Arduino.h>
//#include <ESP8266WiFi.h>

Adafruit_MCP23X17 mcp1;
Adafruit_MCP23X17 mcp2;

const uint8_t pin_bouton1a = 2;
const uint8_t pin_bouton1b = 3;
const uint8_t pin_bouton2a = 4;
const uint8_t pin_bouton2b = 5;
const uint8_t pin_bouton3a = 6;
const uint8_t pin_bouton3b = 7;
const uint8_t pin_bouton4a = 8;
const uint8_t pin_bouton4b = 9;
const uint8_t pin_bouton5a = 10;
const uint8_t pin_bouton5b = 11;
const uint8_t pin_bouton6a = 12;
const uint8_t pin_bouton6b = 13;
const uint8_t pin_led1a = 22;
const uint8_t pin_led1b = 24;
const uint8_t pin_led2a = 26;
const uint8_t pin_led2b = 28;
const uint8_t pin_led3a = 30;
const uint8_t pin_led3b = 32;
const uint8_t pin_led4a = 34;
const uint8_t pin_led4b = 36;
const uint8_t pin_led5a = 38;
const uint8_t pin_led5b = 40;
const uint8_t pin_led6a = 42;
const uint8_t pin_led6b = 44;
const uint8_t relay_pin1a =23;
const uint8_t relay_pin1b = 25;
const uint8_t relay_pin2a = 27;
const uint8_t relay_pin2b = 29;
const uint8_t relay_pin3a = 31;
const uint8_t relay_pin3b = 33;
const uint8_t relay_pin4a = 35;
const uint8_t relay_pin4b = 37;
const uint8_t relay_pin5a = 39;
const uint8_t relay_pin5b = 41;
const uint8_t relay_pin6a = 43;
const uint8_t relay_pin6b = 45;
const uint8_t pin_bouton7a = 0; // input A1 mcp1
const uint8_t pin_bouton7b = 1; // input A2 mcp1
const uint8_t pin_bouton8a = 2; // input A3 mcp1
const uint8_t pin_bouton8b = 3; // inpit A4 mcp1
const uint8_t pin_bouton9a = 4; // input A5 mcp1
const uint8_t pin_bouton9b = 5; // input A6 mcp1
const uint8_t pin_bouton10a = 6; // input A7 mcp1
const uint8_t pin_bouton10b = 7; // input A8 mcp1
const uint8_t pin_led7a = 0; // output A1 mcp2
const uint8_t pin_led7b = 1; // output A2 mcp2
const uint8_t pin_led8a = 2; // output A3 mcp2
const uint8_t pin_led8b = 3; // output A4 mcp2
const uint8_t pin_led9a = 4; // output A5 mcp2
const uint8_t pin_led9b = 5; // output A6 mcp2
const uint8_t pin_led10a =6; // output A7 mcp2
const uint8_t pin_led10b = 7; // output A8 mcp2
const uint8_t relay_pin7a = 8; // output B1 mcp2
const uint8_t relay_pin7b = 9; // output B2 mcp2
const uint8_t relay_pin8a = 10; // output B3 mcp2
const uint8_t relay_pin8b = 11; // output B4 mcp2
const uint8_t relay_pin9a = 12; // output B5 mcp2
const uint8_t relay_pin9b = 13; // output B6 mcp2
const uint8_t relay_pin10a = 14; // output B7 mcp2
const uint8_t relay_pin10b = 15; // output B8 mcp2


void setup()
{
   Serial.begin(9600);
    Serial.println("MCP23xxx Blink Test!");

   if (!mcp1.begin_I2C(0x20)) {
        Serial.println("Error.");
        while (1);
    }

    //for (int i = 0; i < 16; i++)
    //    mcp1.pinMode(i, INPUT_PULLUP);

    if (!mcp2.begin_I2C(0x21)) {
        Serial.println("Error.");
        while (1);
    }

    //for (int i = 0; i < 16; i++)
      //  mcp2.pinMode(i, OUTPUT);
      
      //Serial.println("Looping...");

    
  Serial.begin(115200);
  pinMode( pin_bouton1a, INPUT_PULLUP);
  pinMode( pin_bouton1b, INPUT_PULLUP);
  pinMode( pin_bouton2a, INPUT_PULLUP);
  pinMode( pin_bouton2b, INPUT_PULLUP);
  pinMode( pin_bouton3a, INPUT_PULLUP);
  pinMode( pin_bouton3b, INPUT_PULLUP);
  pinMode( pin_bouton4a, INPUT_PULLUP);
  pinMode( pin_bouton4b, INPUT_PULLUP);
  pinMode( pin_bouton5a, INPUT_PULLUP);
  pinMode( pin_bouton5b, INPUT_PULLUP);
  pinMode( pin_bouton6a, INPUT_PULLUP);
  pinMode( pin_bouton6b, INPUT_PULLUP);
  pinMode( pin_led1a, OUTPUT);
  pinMode( pin_led1b, OUTPUT);
  pinMode( pin_led2a, OUTPUT);
  pinMode( pin_led2b, OUTPUT);
  pinMode( pin_led3a, OUTPUT);
  pinMode( pin_led3b, OUTPUT);
  pinMode( pin_led4a, OUTPUT);
  pinMode( pin_led4b, OUTPUT);
  pinMode( pin_led5a, OUTPUT);
  pinMode( pin_led5b, OUTPUT);
  pinMode( pin_led6a, OUTPUT);
  pinMode( pin_led6b, OUTPUT);
  pinMode( relay_pin1a, OUTPUT);
  pinMode( relay_pin1b, OUTPUT);
  pinMode( relay_pin2a, OUTPUT);
  pinMode( relay_pin2b, OUTPUT);
  pinMode( relay_pin3a, OUTPUT);
  pinMode( relay_pin3b, OUTPUT);
  pinMode( relay_pin4a, OUTPUT);
  pinMode( relay_pin4b, OUTPUT);
  pinMode( relay_pin5a, OUTPUT);
  pinMode( relay_pin5b, OUTPUT);
  pinMode( relay_pin6a, OUTPUT);
  pinMode( relay_pin6b, OUTPUT);
  mcp1.begin_I2C(0x20);
  mcp1.pinMode(pin_bouton7a, INPUT_PULLUP);
  mcp1.pinMode(pin_bouton7b, INPUT_PULLUP);
  mcp1.pinMode(pin_bouton8a, INPUT_PULLUP);
  mcp1.pinMode(pin_bouton8b, INPUT_PULLUP);
  mcp1.pinMode(pin_bouton9a, INPUT_PULLUP);
  mcp1.pinMode(pin_bouton9b, INPUT_PULLUP);
  mcp1.pinMode(pin_bouton10a, INPUT_PULLUP);
  mcp1.pinMode(pin_bouton10b, INPUT_PULLUP);
  mcp2.begin_I2C(0x21);
  mcp2.pinMode(pin_led7a, OUTPUT);
  mcp2.pinMode(pin_led7b, OUTPUT);
  mcp2.pinMode(pin_led8a, OUTPUT);
  mcp2.pinMode(pin_led8b, OUTPUT);
  mcp2.pinMode(pin_led9a, OUTPUT);
  mcp2.pinMode(pin_led9b, OUTPUT);
  mcp2.pinMode(pin_led10a, OUTPUT);
  mcp2.pinMode(pin_led10b, OUTPUT);
  mcp2.pinMode(relay_pin7a, OUTPUT);
  mcp2.pinMode(relay_pin7b, OUTPUT);
  mcp2.pinMode(relay_pin8a, OUTPUT);
  mcp2.pinMode(relay_pin8b, OUTPUT);
  mcp2.pinMode(relay_pin9a, OUTPUT);
  mcp2.pinMode(relay_pin9b, OUTPUT);
  mcp2.pinMode(relay_pin10a, OUTPUT);
  mcp2.pinMode(relay_pin10b, OUTPUT);
}

void loop() {
  uint8_t etat_bouton_actuel1a = digitalRead( pin_bouton1a );
  uint8_t etat_bouton_actuel1b = digitalRead( pin_bouton1b );
  uint8_t etat_bouton_actuel2a = digitalRead( pin_bouton2a );
  uint8_t etat_bouton_actuel2b = digitalRead( pin_bouton2b );
  uint8_t etat_bouton_actuel3a = digitalRead( pin_bouton3a );
  uint8_t etat_bouton_actuel3b = digitalRead( pin_bouton3b );
  uint8_t etat_bouton_actuel4a = digitalRead( pin_bouton4a );
  uint8_t etat_bouton_actuel4b = digitalRead( pin_bouton4b );
  uint8_t etat_bouton_actuel5a = digitalRead( pin_bouton5a );
  uint8_t etat_bouton_actuel5b = digitalRead( pin_bouton5b );
  uint8_t etat_bouton_actuel6a = digitalRead( pin_bouton6a );
  uint8_t etat_bouton_actuel6b = digitalRead( pin_bouton6b );
  uint8_t etat_bouton_actuel7a = mcp1.digitalRead( pin_bouton7a );
  uint8_t etat_bouton_actuel7b = mcp1.digitalRead( pin_bouton7b );
  uint8_t etat_bouton_actuel8a = mcp1.digitalRead( pin_bouton8a );
  uint8_t etat_bouton_actuel8b = mcp1.digitalRead( pin_bouton8b );
  uint8_t etat_bouton_actuel9a = mcp1.digitalRead( pin_bouton9a );
  uint8_t etat_bouton_actuel9b = mcp1.digitalRead( pin_bouton9b );
  uint8_t etat_bouton_actuel10a = mcp1.digitalRead( pin_bouton10a );
  uint8_t etat_bouton_actuel10b = mcp1.digitalRead( pin_bouton10b );

  static uint8_t etat_bouton_precedent1a = etat_bouton_actuel1a;
  static uint8_t etat_bouton_precedent1b = etat_bouton_actuel1b;
  static uint8_t etat_bouton_precedent2a = etat_bouton_actuel2a;
  static uint8_t etat_bouton_precedent2b = etat_bouton_actuel2b;
  static uint8_t etat_bouton_precedent3a = etat_bouton_actuel3a;
  static uint8_t etat_bouton_precedent3b = etat_bouton_actuel3b;
  static uint8_t etat_bouton_precedent4a = etat_bouton_actuel4a;
  static uint8_t etat_bouton_precedent4b = etat_bouton_actuel4b;
  static uint8_t etat_bouton_precedent5a = etat_bouton_actuel5a;
  static uint8_t etat_bouton_precedent5b = etat_bouton_actuel5b;
  static uint8_t etat_bouton_precedent6a = etat_bouton_actuel6a;
  static uint8_t etat_bouton_precedent6b = etat_bouton_actuel6b;
  static uint8_t etat_bouton_precedent7a = etat_bouton_actuel7a;
  static uint8_t etat_bouton_precedent7b = etat_bouton_actuel7b;
  static uint8_t etat_bouton_precedent8a = etat_bouton_actuel8a;
  static uint8_t etat_bouton_precedent8b = etat_bouton_actuel8b;
  static uint8_t etat_bouton_precedent9a = etat_bouton_actuel9a;
  static uint8_t etat_bouton_precedent9b = etat_bouton_actuel9b;
  static uint8_t etat_bouton_precedent10a = etat_bouton_actuel10a;
  static uint8_t etat_bouton_precedent10b = etat_bouton_actuel10b;
  static bool     temporisation_active  = false;
  static uint16_t temporisation_millis  = 0;
  const  uint16_t temporisation_duree   = 500;
  
  //boucle pour aiguillage 1
  if ( etat_bouton_precedent1a != etat_bouton_actuel1a )
  {
    etat_bouton_precedent1a = etat_bouton_actuel1a;
    delay( 30 );

    if ( etat_bouton_actuel1a == LOW )
    {
      if ( temporisation_active == true )
      {
        Serial.println( "La temporisation est déjà active!" );
      }
      else
      {
        Serial.println( "Début de la temporisation." );
        temporisation_active = true;
        temporisation_millis = millis();
        digitalWrite( relay_pin1a, HIGH );
        digitalWrite( relay_pin3a, HIGH); //a valider si 3A ou 3B
        digitalWrite( pin_led1a, HIGH);
        digitalWrite( pin_led1b, LOW);
        digitalWrite( pin_led3a, HIGH); //a valider
        digitalWrite( pin_led3b, LOW); //a valider
      }
    }
  }
 if ( etat_bouton_precedent1b != etat_bouton_actuel1b )
  {
    etat_bouton_precedent1b = etat_bouton_actuel1b;
    delay( 30 );

    if ( etat_bouton_actuel1b == LOW )
    {
      if ( temporisation_active == true )
      {
        Serial.println( "La temporisation est déjà active!" );
      }
      else
      {
        Serial.println( "Début de la temporisation." );
        temporisation_active = true;
        temporisation_millis = millis();
        digitalWrite( relay_pin1b, HIGH );
        digitalWrite( pin_led1b, HIGH);
        digitalWrite( pin_led1a, LOW);
      }
    }
  }
  //boucle pour aiguillage 2
 if ( etat_bouton_precedent2a != etat_bouton_actuel2a )
  {
    etat_bouton_precedent2a = etat_bouton_actuel2a;
    delay( 30 );

    if ( etat_bouton_actuel2a == LOW )
    {
      if ( temporisation_active == true )
      {
        Serial.println( "La temporisation est déjà active!" );
      }
      else
      {
        Serial.println( "Début de la temporisation." );
        temporisation_active = true;
        temporisation_millis = millis();
        digitalWrite( relay_pin2a, HIGH );
        digitalWrite( relay_pin4a, HIGH);
        digitalWrite( pin_led2a, HIGH);
        digitalWrite( pin_led2b, LOW);
        digitalWrite( pin_led4a, HIGH);
        digitalWrite( pin_led4b, LOW);
      }
    }
  }
 if ( etat_bouton_precedent2b != etat_bouton_actuel2b )
  {
    etat_bouton_precedent2b = etat_bouton_actuel2b;
    delay( 30 );

    if ( etat_bouton_actuel2b == LOW )
    {
      if ( temporisation_active == true )
      {
        Serial.println( "La temporisation est déjà active!" );
      }
      else
      {
        Serial.println( "Début de la temporisation." );
        temporisation_active = true;
        temporisation_millis = millis();
        digitalWrite( relay_pin2b, HIGH );
        digitalWrite( relay_pin3b, HIGH);
        digitalWrite( pin_led2b, HIGH);
        digitalWrite( pin_led2a, LOW);
        digitalWrite( pin_led3b, HIGH);
        digitalWrite( pin_led3a, LOW);
      }
    }
  }
 // boucle pour aiguillage 3
 if ( etat_bouton_precedent3a != etat_bouton_actuel3a )
  {
    etat_bouton_precedent3a = etat_bouton_actuel3a;
    delay( 30 );

    if ( etat_bouton_actuel3a == LOW )
    {
      if ( temporisation_active == true )
      {
        Serial.println( "La temporisation est déjà active!" );
      }
      else
      {
        Serial.println( "Début de la temporisation." );
        temporisation_active = true;
        temporisation_millis = millis();
        digitalWrite( relay_pin3a, HIGH );
        digitalWrite( pin_led3a, HIGH);
        digitalWrite( pin_led3b, LOW);
      }
    }
  }
 if ( etat_bouton_precedent3b != etat_bouton_actuel3b )
  {
    etat_bouton_precedent3b = etat_bouton_actuel3b;
    delay( 30 );

    if ( etat_bouton_actuel3b == LOW )
    {
      if ( temporisation_active == true )
      {
        Serial.println( "La temporisation est déjà active!" );
      }
      else
      {
        Serial.println( "Début de la temporisation." );
        temporisation_active = true;
        temporisation_millis = millis();
        digitalWrite( relay_pin3b, HIGH );
        digitalWrite( pin_led3b, HIGH);
        digitalWrite( pin_led3a, LOW);
      }
    }
  }
  // boucle aiguillage 4
 if ( etat_bouton_precedent4a != etat_bouton_actuel4a )
  {
    etat_bouton_precedent4a = etat_bouton_actuel4a;
    delay( 30 );

    if ( etat_bouton_actuel4a == LOW )
    {
      if ( temporisation_active == true )
      {
        Serial.println( "La temporisation est déjà active!" );
      }
      else
      {
        Serial.println( "Début de la temporisation." );
        temporisation_active = true;
        temporisation_millis = millis();
        digitalWrite( relay_pin4a, HIGH );
        digitalWrite( pin_led4a, HIGH);
        digitalWrite( pin_led4b, LOW);
      }
    }
  }
 if ( etat_bouton_precedent4b != etat_bouton_actuel4b )
  {
    etat_bouton_precedent4b = etat_bouton_actuel4b;
    delay( 30 );

    if ( etat_bouton_actuel4b == LOW )
    {
      if ( temporisation_active == true )
      {
        Serial.println( "La temporisation est déjà active!" );
      }
      else
      {
        Serial.println( "Début de la temporisation." );
        temporisation_active = true;
        temporisation_millis = millis();
        digitalWrite( relay_pin4b, HIGH );
        digitalWrite( pin_led4b, HIGH);
        digitalWrite( pin_led4a, LOW);
      }
    }
  }
 //   boucle aiguillge 5
 if ( etat_bouton_precedent5a != etat_bouton_actuel5a )
  {
    etat_bouton_precedent5a = etat_bouton_actuel5a;
    delay( 30 );

    if ( etat_bouton_actuel5a == LOW )
    {
      if ( temporisation_active == true )
      {
        Serial.println( "La temporisation est déjà active!" );
      }
      else
      {
        Serial.println( "Début de la temporisation." );
        temporisation_active = true;
        temporisation_millis = millis();
        digitalWrite( relay_pin5a, HIGH );
        digitalWrite( relay_pin6b, HIGH );
        digitalWrite( pin_led5a, HIGH);
        digitalWrite( pin_led5b, LOW);
        digitalWrite( pin_led6b, HIGH);
        digitalWrite( pin_led6a, LOW);
      }
    }
  }
 if ( etat_bouton_precedent5b != etat_bouton_actuel5b )
  {
    etat_bouton_precedent5b = etat_bouton_actuel5b;
    delay( 30 );

    if ( etat_bouton_actuel5b == LOW )
    {
      if ( temporisation_active == true )
      {
        Serial.println( "La temporisation est déjà active!" );
      }
      else
      {
        Serial.println( "Début de la temporisation." );
        temporisation_active = true;
        temporisation_millis = millis();
        digitalWrite( relay_pin5b, HIGH );
        digitalWrite( pin_led5b, HIGH);
        digitalWrite( pin_led5a, LOW);
      }
    }
  }
 // boucle aiguillge 6
 if ( etat_bouton_precedent6a != etat_bouton_actuel6a )
  {
    etat_bouton_precedent6a = etat_bouton_actuel6a;
    delay( 30 );

    if ( etat_bouton_actuel6a == LOW )
    {
      if ( temporisation_active == true )
      {
        Serial.println( "La temporisation est déjà active!" );
      }
      else
      {
        Serial.println( "Début de la temporisation." );
        temporisation_active = true;
        temporisation_millis = millis();
        digitalWrite( relay_pin6a, HIGH );
        digitalWrite( pin_led6a, HIGH);
        digitalWrite( pin_led6b, LOW);
      }
    }
  }
 if ( etat_bouton_precedent6b != etat_bouton_actuel6b )
  {
    etat_bouton_precedent6b = etat_bouton_actuel6b;
    delay( 30 );

    if ( etat_bouton_actuel6b == LOW )
    {
      if ( temporisation_active == true )
      {
        Serial.println( "La temporisation est déjà active!" );
      }
      else
      {
        Serial.println( "Début de la temporisation." );
        temporisation_active = true;
        temporisation_millis = millis();
        digitalWrite( relay_pin6b, HIGH );
        digitalWrite( pin_led6b, HIGH);
        digitalWrite( pin_led6a, LOW);
      }
    }
  }
 // boucle aiguillge 7
 if ( etat_bouton_precedent7a != etat_bouton_actuel7a )
  {
    etat_bouton_precedent7a = etat_bouton_actuel7a;
    delay( 30 );

    if ( etat_bouton_actuel7a == LOW )
    {
      if ( temporisation_active == true )
      {
        Serial.println( "La temporisation est déjà active!" );
      }
      else
      {
        Serial.println( "Début de la temporisation." );
        temporisation_active = true;
        temporisation_millis = millis();
        mcp2.digitalWrite( relay_pin7a, HIGH );
        mcp2.digitalWrite( pin_led7a, HIGH);
        mcp2.digitalWrite( pin_led7b, LOW);
      }
    }
  }
 if ( etat_bouton_precedent7b != etat_bouton_actuel7b )
  {
    etat_bouton_precedent7b = etat_bouton_actuel7b;
    delay( 30 );

    if ( etat_bouton_actuel7b == LOW )
    {
      if ( temporisation_active == true )
      {
        Serial.println( "La temporisation est déjà active!" );
      }
      else
      {
        Serial.println( "Début de la temporisation." );
        temporisation_active = true;
        temporisation_millis = millis();
        mcp2.digitalWrite( relay_pin7b, HIGH );
        mcp2.digitalWrite( pin_led7b, HIGH);
        mcp2.digitalWrite( pin_led7a, LOW);
      }
    }
  }
  // boucle aiguillge 8
 if ( etat_bouton_precedent8a != etat_bouton_actuel8a )
  {
    etat_bouton_precedent8a = etat_bouton_actuel8a;
    delay( 30 );

    if ( etat_bouton_actuel8a == LOW )
    {
      if ( temporisation_active == true )
      {
        Serial.println( "La temporisation est déjà active!" );
      }
      else
      {
        Serial.println( "Début de la temporisation." );
        temporisation_active = true;
        temporisation_millis = millis();
        mcp2.digitalWrite( relay_pin8a, HIGH );
        mcp2.digitalWrite( pin_led8a, HIGH);
        mcp2.digitalWrite( pin_led8b, LOW);
      }
    }
  }
 if ( etat_bouton_precedent8b != etat_bouton_actuel8b )
  {
    etat_bouton_precedent8b = etat_bouton_actuel8b;
    delay( 30 );

    if ( etat_bouton_actuel8b == LOW )
    {
      if ( temporisation_active == true )
      {
        Serial.println( "La temporisation est déjà active!" );
      }
      else
      {
        Serial.println( "Début de la temporisation." );
        temporisation_active = true;
        temporisation_millis = millis();
        mcp2.digitalWrite( relay_pin8b, HIGH );
        mcp2.digitalWrite( pin_led8b, HIGH);
        mcp2.digitalWrite( pin_led8a, LOW);
      }
    }
  }
  // boucle aiguillge 9
 if ( etat_bouton_precedent9a != etat_bouton_actuel9a )
  {
    etat_bouton_precedent9a = etat_bouton_actuel9a;
    delay( 30 );

    if ( etat_bouton_actuel9a == LOW )
    {
      if ( temporisation_active == true )
      {
        Serial.println( "La temporisation est déjà active!" );
      }
      else
      {
        Serial.println( "Début de la temporisation." );
        temporisation_active = true;
        temporisation_millis = millis();
        mcp2.digitalWrite( relay_pin9a, HIGH );
        mcp2.digitalWrite( pin_led9a, HIGH);
        mcp2.digitalWrite( pin_led9b, LOW);
      }
    }
  }
 if ( etat_bouton_precedent9b != etat_bouton_actuel9b )
  {
    etat_bouton_precedent9b = etat_bouton_actuel9b;
    delay( 30 );

    if ( etat_bouton_actuel9b == LOW )
    {
      if ( temporisation_active == true )
      {
        Serial.println( "La temporisation est déjà active!" );
      }
      else
      {
        Serial.println( "Début de la temporisation." );
        temporisation_active = true;
        temporisation_millis = millis();
        mcp2.digitalWrite( relay_pin9b, HIGH );
        mcp2.digitalWrite( pin_led9b, HIGH);
        mcp2.digitalWrite( pin_led9a, LOW);
      }
    }
  }
  // boucle aiguillge 10
 if ( etat_bouton_precedent10a != etat_bouton_actuel10a )
  {
    etat_bouton_precedent10a = etat_bouton_actuel10a;
    delay( 30 );

    if ( etat_bouton_actuel10a == LOW )
    {
      if ( temporisation_active == true )
      {
        Serial.println( "La temporisation est déjà active!" );
      }
      else
      {
        Serial.println( "Début de la temporisation." );
        temporisation_active = true;
        temporisation_millis = millis();
        mcp2.digitalWrite( relay_pin10a, HIGH );
        mcp2.digitalWrite( pin_led10a, HIGH);
        mcp2.digitalWrite( pin_led10b, LOW);
      }
    }
  }
 if ( etat_bouton_precedent10b != etat_bouton_actuel10b )
  {
    etat_bouton_precedent10b = etat_bouton_actuel10b;
    delay( 30 );

    if ( etat_bouton_actuel10b == LOW )
    {
      if ( temporisation_active == true )
      {
        Serial.println( "La temporisation est déjà active!" );
      }
      else
      {
        Serial.println( "Début de la temporisation." );
        temporisation_active = true;
        temporisation_millis = millis();
        mcp2.digitalWrite( relay_pin10b, HIGH );
        mcp2.digitalWrite( pin_led10b, HIGH);
        mcp2.digitalWrite( pin_led10a, LOW);
      }
    }
  }
 if ( temporisation_active == true && millis() - temporisation_millis >= temporisation_duree )
  {
    Serial.println( "Fin de la temporisation." );
    temporisation_active = false;
    digitalWrite( relay_pin1a, LOW);
    digitalWrite( relay_pin1b, LOW);
    digitalWrite( relay_pin2a, LOW);
    digitalWrite( relay_pin2b, LOW);
    digitalWrite( relay_pin3a, LOW);
    digitalWrite( relay_pin3b, LOW);
    digitalWrite( relay_pin4a, LOW);
    digitalWrite( relay_pin4b, LOW);
    digitalWrite( relay_pin5a, LOW);
    digitalWrite( relay_pin5b, LOW);
    digitalWrite( relay_pin6a, LOW);
    digitalWrite( relay_pin6b, LOW);
    mcp2.digitalWrite(relay_pin7a, LOW);
    mcp2.digitalWrite(relay_pin7b, LOW);
    mcp2.digitalWrite(relay_pin8a, LOW);
    mcp2.digitalWrite(relay_pin8b, LOW);
    mcp2.digitalWrite(relay_pin9a, LOW);
    mcp2.digitalWrite(relay_pin9b, LOW);
    mcp2.digitalWrite(relay_pin10a, LOW);
    mcp2.digitalWrite(relay_pin10b, LOW);
  }
}

)

Please do not post pictures of code. Post using code tags instead

Please follow the advice given in the link below when posting code, in particular the section entitled 'Posting code and common code problems'

Use code tags (the < CODE/ > icon above the compose window) to make it easier to read and copy for examination

https://forum.arduino.cc/t/how-to-get-the-best-out-of-this-forum/679966

Please post your full sketch, using code tags when you do

Posting your code using code tags prevents parts of it being interpreted as HTML coding and makes it easier to copy for examination

In my experience the easiest way to tidy up the code and add the code tags is as follows

Start by tidying up your code by using Tools/Auto Format in the IDE to make it easier to read. Then use Edit/Copy for Forum and paste what was copied in a new reply. Code tags will have been added to the code to make it easy to read in the forum thus making it easier to provide help.

It is also helpful to post full error messages in code tags as it makes it easier to scroll through them and copy them for examination

To post the error message, click the "COPY ERROR MESSAGES" button in the IDE, paste the copied messages in a reply here, select all of it and click the < CODE > icon above the reply editor to add the code tags and then save the reply

hope this way is ok, ther is no message error. the problem is that the output comme all activate on power up but yestarday they where not operate the same. yesterday they where all non avtivated on power up.

Thank you for adding the code tags

I assume that your problem is that all of the relays are activated at startup. Are the relays active HIGH or active LOW, what is connected to them and which relay contacts do you use to control whatever is connected ?

How are the relays powered ?

Exactly what code did you add ?

Your system is doing exactly what it was designed to do. When the part is powered up all of the pins are set to input. Your pull up resistor will make them look like they are on. They will remain that way until you program them to a different value.

ok it looks bizarre to me because yesterday, the output (all of them drived low voltage relay) was off (non activated). so i understand that i need to add code to push my output to LOW (non activated).

the realy are in fact low voltage 5v relay card (16 relay) a had 3 of them. they are powered by 12 volts dc and the low voltage 5v is use to drive the relay

As soon as you go (non activated) they will go back to the input mode and be pulled high.

I highly recommend you get a copy of the Arduino Cookbook and skim it cover to cover, that will help you understand what is happening.

the pushbutton connected to my input are all wired open and then on a pushed, i pull them to gnd.

in some sub routine, i add output sketch. so depending on condition a push HIGH some ouyput and push LOW others. by exemple see below the relay_pin4a, the pin_led4a and pin_led4b are the line code that i add in sub routine name AIGUILLAGE 2 (in 4 different subroutine)

   Serial.println( "Début de la temporisation." );
        temporisation_active = true;
        temporisation_millis = millis();
        digitalWrite( relay_pin2a, HIGH );
        digitalWrite( relay_pin4a, HIGH);
        digitalWrite( pin_led2a, HIGH);
        digitalWrite( pin_led2b, LOW);
        digitalWrite( pin_led4a, HIGH);
        digitalWrite( pin_led4b, LOW);

well, i am so confused that since this mornig everything works fine...i will have a good reflexion on my wiring and code. i do not want to replace all my pushbutton actullay normally open (and gnd and i push them).

I think that we have a language problem

When you do

digitalWrite(relayPin, HIGH);

does the relay turn on or turn off ?

before today, they turn on. Now they are all on when i powerup !
it looks like all my input read low (Gnd) an the code responding as is. i will take a look to my wirng to see a mismatch or wire to touch each others....

You still haven't answered @UKHeliBob's question, and it's important.
Are relays activated by HIGH or LOW?

here is the working of those low-viltge relay

SainSmart relay modules (typically 4, 8, or 16 channels) are widely used with Arduino or Raspberry Pi to control high-voltage/current devices. Most operate at 5V or 12V and feature active-low logic (relay turns ON when input is grounded). Key connections include VCC (+5V/12V), GND, and input pins (IN1-INn

That's the correct answer. ;)

That is the information that I was asking for

So, something is making the relay pins go LOW at startup

What happens if the only code that runs is in setup() ?
Put this as the last line of code in setup() and report what happens. Do the relays turn on ?

while(true);

i will do later (working time here) and let you know.

you mean right after brace ?

  mcp2.pinMode(relay_pin8b, OUTPUT);
  mcp2.pinMode(relay_pin9a, OUTPUT);
  mcp2.pinMode(relay_pin9b, OUTPUT);
  mcp2.pinMode(relay_pin10a, OUTPUT);
  mcp2.pinMode(relay_pin10b, OUTPUT);
}
**While(true);**

void loop() {
  uint8_t etat_bouton_actuel1a = digitalRead( pin_bouton1a );
  uint8_t etat_bouton_actuel1b = digitalRead( pin_bouton1b );
  uint8_t etat_bouton_actuel2a = digitalRead( pin_bouton2a );

No, right before the closing brace of setup()

It will stop the sketch at that point and provide more clues as to your problem

Note the exact spelling of while