[AIDE] - possiblité d'un seul bouton pour manu et / ou auto ?

merci pour ton retour !!

entre temps j'avais edité ma réponse , mais j'ai modifé le code avec ton aide,

cela te parait correct dans ce sens ?

void setup() {


boolean buttonState = 0;
int buttonPin = 4;
int ledPin = 13;
long tempo = millis();

pinMode(buttonPin, INPUT_PULLUP);
pinMode(ledPin, OUTPUT);


}

void loop() {


if (DigitalRead(buttonPin) == LOW)
{
    while (DigitalRead(buttonPin) == LOW; {

        if ((millis()-tempo)>1000 ){ digitalWrite(ledPin) ; } //marche manuelle 
        if ((millis()-tempo)<1000 ){ // marche auto
        digitalWrite(ledPin); 
        delay(10000); 
                                   }
    
}