سلام یه سری به لینک زیر بزنید:
Arduino 101: Timers and Interrupts | Let's Make Robots!