Changed TIMSK to TIMSK1 in the code snippets