     Serial.println("error");
 }
 
+void enableRtcAlarm()
+{
+	RTC.enableAlarm(ALARM_0, ALM_MATCH_HOURS);
+	RTC.enableAlarm(ALARM_1, ALM_MATCH_MINUTES);
+	RTC.alarmPolarity(LOW);
+
+	// save status to SRAM, easier retrieval
+	RTC.sramWrite(ALARM_ON_ADDR, 1);
+}
+
+void disableRtcAlarm()
+{
+	RTC.enableAlarm(ALARM_0, ALM_DISABLE);
+	RTC.enableAlarm(ALARM_1, ALM_DISABLE);
+	
+	// save status to SRAM, easier retrieval
+	RTC.sramWrite(ALARM_ON_ADDR, 0);
+}
+
+byte isRtcAlarmOn()
+{
+	byte alarmOn = RTC.sramRead(ALARM_ON_ADDR);
+	return alarmOn;
+}
+
+void setRtcAlarm(byte hour, byte minute)
+{	
+	tmElements_t hourSetting;
+	hourSetting.Hour = hour;
+	RTC.setAlarm(ALARM_0, makeTime(hourSetting));
+
+	tmElements_t minuteSetting;
+	minuteSetting.Minute = minute;
+	RTC.setAlarm(ALARM_1, makeTime(minuteSetting));
+
+	// save alarm setting to parts of SRAM, easier retrieval
+	RTC.sramWrite(ALARM_H_ADDR, hour);
+	RTC.sramWrite(ALARM_M_ADDR, minute);
+}
 
 // ---------------------- //
 //  Display Update fnc

#include <Wire.h>
#include <OneWire.h>
#include <TimerOne.h>
#include <DallasTemperature.h>
#include <OneButton.h>
#include <Time.h>
#include <MCP79412RTC.h>
#include <avr/pgmspace.h>

#include "SevenSegController.h"
#include "pitches.h"

// ---------------------- //
//  display control pins

byte fsmState       = 0;
byte activeDigit    = 0;
byte digitValues[N] = {0,0,0,0};
int  tempInCelsius  = 0;
unsigned long updateInterval    = 100;
unsigned long lastTempRead      = 0;
