pin monitor dration

hello,

can anyone help me !!

i need to check if a pin is high for 10 min how could i do that?

thanks in advance :confused:

zouzanda: hello,

can anyone help me !!

i need to check if a pin is high for 10 min how could i do that?

thanks in advance :confused:

Welcome to the Arduino forum.

We would be glad to help if you show us what you are currently using to check the pin.

Paul

The following is a simple way to check if a button is pressed continuously for a certain length of time

void loop() {
   buttonState = digitalRead(buttonPin);
   if (buttonState == HIGH) {   // assumes LOW when pressed and HIGH when not-pressed
       lastTimeButtonWasHigh = millis();
   }

   if (millis() - lastTimeButtonWasHigh >= requiredTime) {
       // input has been LOW throughout the required time
       // do whatever needs to be done
   }
}

For your HIGH pin you will need to check for LOW rather than the HIGH in the example

...R

thank you a lot sir i will try it and revert back to u :slight_smile:

thank you Robin2 it worked great :) :) :)