Timer after press button

Yes exactly - and that’s the example I used.
But just defining a second timer makes the board crash.

try not to define the t1 and t2.

Just declare them as int’s .

int t1, t2;

@fxfever what’s the memory details when you compile with one timer?

Pls help me…i have this error and i not understand :frowning:

exit status 1
‘param’ was not declared in this scope

What ??

@Lufkin that suggests you have a bug in your code.

Thanks, i solved the problem

i have last question about this function

Now if i Press a botton (V12)
Relay Pin D5 start cycle and work is good!

but now i need to add other relay (when V12 are switch on) without cycle…only turn on

situation :

V12 ON
D5 pin cycle time
D6 pin turn on

V12 OFf
D5 Off
D6 Off

Can you help me to undestatand ths?

@Lufkin you want to control 2 relays, correct?

Are the 2 relays in any way connected in your project or are they both independent of each other?

If they are independent I would just duplicate all the code and make a minor adjustment to the variable names for the 2nd relay.

Hi Fettkeewl

i have a question

in your code if i press ON button, start with 20sec OFF and 10 ON

but i need to place inverse time…

when start — >> 20sec ON and 10 off

but i not understand …can you help me??

Thanks very very much

Just swap theese values