I need help ,Please.

Guys is there such a function that makes arduino do something like this next example
(in void setup
make a delay for 40 minutes
except a button is pressed
if it is pressed cancel the delay
help me quick please because i'm working on an important project

We all are :wink:

But no, not as a function. But you can use a combination of a loop and millis(). See Blink without delay.

(deleted)

septillion:
We all are :wink:

But no, not as a function. But you can use a combination of a look and millis(). See Blink without delay.

can you please define what you mean
how can i use that combination ???
and i know nothing about a look what is it
please provide links
thank you very much for your respond

Pardon me, I meant loop :slight_smile: Have a look at Blink without delay like I said.

PS, I hope you code better then you write. The compiler isn't so forgiving with the lack of capitals and punctuation...

I read the example and i still couldn't come up with the idea to do it so if you could please tell me how or show me an example that would be awesome
thanks again

help me quick please because i'm working on an important project

So am I.

Come back tomorrow and post again, to remind me of your desperate need.

make a delay for 40 minutes
except a button is pressed
if it is pressed cancel the delay

save the start time from millis()
while 40 minutes has not passed since the start time and the button has not been pressed
keep testing the elapsed time and the button state

A-GIGANTIC-Newbie:
help me quick please because i'm working on an important project

So, naturally you'd be happy to pay for important help for your important project. Why not take this to "Gigs and Collaborations"?

Alternatively, you could look through your lecture notes.

BTW, what happens if the button isn’t pressed ?