while(alarmFlag != true) {}
Unless alarmFlag is set in an interrupt, you will never get out of that loop.