Fade LED up and down with signal

Hi ! First post here so hope i get this right.

Here is my problem :

I want to use a TIP120 transistor to turn on and of a 12v led with the arduino. Simple. But then i want a 0 signal to start to fade up the LED light and when the arduino get 1 signal again i want it to fade the LED down and turn it of.

Another problem is the delay, cant use that in my program.

So need a code to start the fading up when the arduino input is low. When the light is faded up max it will stay there until the arduino get a 1 signal, then start to fade down and turn it of at the end

I want the fading up and down to be on ca 10 sec or something.

Can someone help me with this ?

Another problem is the delay, cant use that in my program.

The IDE includes an example called "blink without delay" which shows how to manage timing tasks without using delay.

Yeah, i know, but i cant understand how the " blink without delay" can work with this problem... Could you maybe write me an eksample code? Would be wery helpfull.

Instead of thinking of it as "blink" (ie, simply flip a bit), think of it as "signal an event", like " increase the brightness of my LED"

Okei, i think i understand what you mean. But i also struggle to make a code to dim the light. I made a code to dim it up and down, but i had problem to get the led lighting max between dim up and down. If you understand?