added the timer related code

(1)Enable Timer1 for the button events
(2)Separate the check_button() into sigle events