For loop into a function

You have to make the imaginary LED blink