delay()

Hello!!!
I got it !! in the end I did it with the "timer.setTimeout", and I left it perfect.
I had to change my way of programming the instruction, since I indicated that the LED was on when I called the function, and now, what it does, is to turn off the led when the function calls, but the result is the same !!

infinite thanks!