I have a project to make an LED fade in for 1 sec, stay on for 1 sec, fade out for 1 sec and then stay off for 1 sec, all the project must be done with registers and with the help of the timer0 fast PWM functionality without any functions (e.g. analogWrite
).
I already have to logical part of the problem, I know how to generate an interrupt on timer0, but I can't figure out the fading part. How do I give a specific brightness to the LED with registers?
Maybe I am missing the documentation, I don't mind if you suggest something to read first and then came back with questions.
millis
ordelay
! \$\endgroup\$