-
Notifications
You must be signed in to change notification settings - Fork 22
SetAlarms.ino
Sample Arduino sketch to demonstrate setting and using the two alarms on the MCP7940. For a detailed breadboard setup description see the SetAndCalibrate.ino page.
The sketch sets alarm 0 to trigger whenever the seconds are "00" (i.e. every minute) while alarm 1 is set to trigger at exactly 1 minute after the program initialized.
The main loop displays when either alarm goes off and resets alarm 1 so that it goes off again one minute later. The sketch makes use of the sprintf() function to print out the date/time since this function allows formatting leading zeroes, which the Serial.print() function does not.
Overview
Installation
Class Instantiation
DateTime Helper Class
TimeSpan Helper Class
begin()
deviceStatus()
deviceStart()
deviceStop()
now()
adjust()
calibrate()
calibrateOrAdjust()
getCalibrationTrim()
weekdayRead()
weekdayWrite()
readRAM()
writeRAM()
setMFP()
getMFP()
setAlarm()
getAlarm()
setAlarmState()
setAlarmPolarity()
getAlarmState()
clearAlarm()
getSQWSpeed()
setSQWSpeed()
setSQWState()
getPowerFail()
clearPowerFail()
getBattery()
setBattery()
getPowerDown()
getPowerUp()
readEUI() {00/01/02 only}
writEUI() {00/01/02 only}
-none-
SetAndCalibrate.ino
SetAlarms.ino
SquareWave.ino
TestBatteryBackup.ino
SimpleBatteryBackup.ino
AccessMemory.ino
RegressionTests.ino