using a periodic interrupter