Do I need an interrupt?

well just have a look at this ! Mikeys Notes
and try to integrate it with your code