Now controlling with a timer interrupt.