Nope, I made one of my many mistakes. I was planning to give the OP a basic working code like I just did for something to "start" with. Then if needed try to do a little "teaching".
Seems like a simple operation, but to make it work well some sort of de-bouncing and maybe an interrupt will be needed.



Better to teach than to do. that way we learn something.


Bookmarks