pwm with delay

Your first example in the previous post looks OK to me. Every 10 mS you are increasing the brightness by 1.