Arduino timer1 on MEGA resetting every 4s. What did I do wrong?

Code: ArduinoTimerInterrupt - Pastebin.com

I followed two nearly identical tutorials, one of which is linked in the code. My board outputs '2hz' and then resets. I expect it to go through the entire test suite. What am I doing wrong? Did I somehow accidentally activate the watchdog?

Thank you!

The code you link to mentions TIMER_COMPA_vect, but the Mega only has numbered
timers. (such as TIMER1_COMPA_vect)

How to use this forum

Attach the code to your post please, rather than using pastebin.