Changeset 175 for rtos_arduino/trunk/arduino_lib/libraries/RTC/examples/ALARM_polled/ALARM_polled.ino
- Timestamp:
- Mar 28, 2016, 2:09:46 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
rtos_arduino/trunk/arduino_lib/libraries/RTC/examples/ALARM_polled/ALARM_polled.ino
r136 r175 2 2 * This sketch demonstrates how configure alarm in polled mode. 3 3 In this mode you hav to check continuously ALARM0 flag in the main program code. 4 5 NOTE: for M0/M0 pro only you can select the oscillator source for count. 6 If you want to use a low power oscillator use rtc.begin(TIME_H24, LOW_POWER); function. 7 If you want to use a more accurate oscillator use rtc.begin(TIME_H24, HIGH_PRECISION); function. 4 8 *********************************************************************************************************************************************************************************/ 5 9 … … 17 21 rtc.setDate(13,8,15); //setting date 18 22 rtc.enableAlarm(SEC,ALARM_POLLED,NULL); //enabling alarm in polled mode and match on second 19 rtc. local_time.hour=17;20 rtc. local_time.minute=5;21 rtc. local_time.second=10; //setting second to match23 rtc.time.hour=17; 24 rtc.time.minute=5; 25 rtc.time.second=10; //setting second to match 22 26 rtc.setAlarm(); //write second in alarm register 23 27 }
Note:
See TracChangeset
for help on using the changeset viewer.