 			break;
 
 		case SHOW_ALARM_MODE:
-			if (RTC.alarm(ALARM_0) | (RTC.alarm(ALARM_1)))
-				Serial.println("Alarm!");
-			else
-				oldFsmState = fsmState;
-				fsmState = SHOW_TIME_MODE;
+			Serial.print("ALARM TRIGGERED :");
+			digitalClockDisplay();
 			break;
 
 		case ERROR_MODE:


void setRtcAlarm(byte hour, byte minute)
{	
	tmElements_t hourSetting;
	hourSetting.Hour = hour;
	RTC.setAlarm(ALARM_0, makeTime(hourSetting));

	} else
	{
		Serial.println("RTC has set the system time"); 
		//fsmState = ERROR_MODE;
	}
	
	// default alarm settings, 08:30, disabled
	pinMode(ALARM_PIN, INPUT_PULLUP);
	//setRtcAlarm(8,30);
	//disableRtcAlarm();
}

void loop()
{
	// If error detected, disable buttons.
	if (fsmState != ERROR_MODE)
	{
		buttonA.tick();
