Added arduino code for timer and hardware interrupts.