I would like to write a function that increment LED
* - 500ms
** - 500ms
The function will be triggered by a switch statement, so when the particular case is entered the increment should start.
I have difficulties setting the time. I don't care if need to be done by simple delay function.
So any idea how this should be done, I am using ATmega329PA
P.S I don't know if I'm writing in the right forum so if not feel free to move,.
Thanks in advance!