Arduino Function: rtc. enableAlarm

Description

This method enables alarm on RTC. Mode parameter specifies the match type of alarm precisely: OFF alarm disabled SEC alarm match on seconds MMSS alarm match on minutes and seconds HHMMSS alarm match on hours, minute and seconds DDHHMMSS alarm match on day, hours, minutes and seconds MMDDHHMMSS alarm match on month, day hours, minutes and seconds YYMMDDHHMMSS alarm match on year, month, day, hours, minutes and seconds. Type parameter specifies if alarm match is polling or interrupt and callback parameter is the pointer to interrupt routine. If you use alarm match polled, assign NULL to callback parameter.

Syntax

rtc.setAlarm(SEC,ALARM_POLLED,NULL); //for alarm polled rtc.setAlarm(SEC,ALARM_INTERRUPT,my_function); //for interrupt

Parameters

unsigned int mode * unsigned int type * voidFuncPtr callback

Written by arduino.org