fade in led problem

Hello,

Thanks for the quick reply... I'm sorry for the troubles with the code, i will use auto format from now on :frowning: ... If it's not the problem for you can you try to explain to me why I have to reset the brightness? Shouldn't the program when it comes to an end of the loop be returned to the beginning of the loop where the brightness is set to 0 (analogWrite led1, brightness1)?