IsaacChuah90
New Member
Hey guys, I'm new here. Nice to meet you all. Can I know how to set a alarm for my real time clock? Any coding can I refer to? Seeking for helps guys! Thanks....
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
clksec=uc_i2c_rtc_get_seconds(); //read 1 byte seconds
clkmin= uc_i2c_rtc_get_minutes(); //read 1 byte min
clkhrs=uc_i2c_rtc_get_hours(); //read 1 byte hrs
...
clkmin= uc_i2c_rtc_get_minutes(); //read 1 byte min
clkhrs=uc_i2c_rtc_get_hours(); //read 1 byte hrs
...
if ( (clkmin == alarmMin) && (clkhrs == alarmHrs) )
{
activateAlarm();
}
Is this an existing project somewhere on the web? If so, do you have a link, please?
unsigned_char alarmMin=0;
unsigned_char alarmHrs=0;
clksec=uc_i2c_rtc_get_seconds(); //read 1 byte seconds
clkmin=uc_i2c_rtc_get_minutes(); //read 1 byte min
clkhrs=uc_i2c_rtc_get_hours(); //read 1 byte hrs
alarmMin=uc_i2c_rtc_get_minutes();
alarmHrs=uc_i2c_rtc_get_hours();