Well after you made an edit to your post you have some explanation.
Looping back through the code every so often to check on a button smells like some sort of pasta to me.
Maybe the OP should learn to use the hardware. Then when the code grow to more than a few lines......
Wait a minute. Your joking, right?
Using an interrupt is forming bad habits.
Now I get it.
NOT!
Bookmarks