RTC come on when time = now and stay on until time = now
hi guys,
im trying programme lights come on @ time , stay on unit next stated time elapses.
for example:
{
datetime = rtc.now();
if (
(autolightson_h == now.hour()) &&
(autolightson_m == now.minute()) &&
(autolightson_s == now.second()))
{
//carry out x protocol until
}
{
(autolightsoff_h == now.hour()) &&
(autolightsoff_m == now.minute()) &&
(autolightsoff_s == now.second()))
}
}
i cant figure out how it,
would "do...while" function work?
cheers, guys
im trying programme lights come on @ time , stay on unit next stated time elapses.
for example:
{
datetime = rtc.now();
if (
(autolightson_h == now.hour()) &&
(autolightson_m == now.minute()) &&
(autolightson_s == now.second()))
{
//carry out x protocol until
}
{
(autolightsoff_h == now.hour()) &&
(autolightsoff_m == now.minute()) &&
(autolightsoff_s == now.second()))
}
}
i cant figure out how it,
would "do...while" function work?
cheers, guys
any one?
Arduino Forum > Using Arduino > Project Guidance > RTC come on when time = now and stay on until time = now
arduino
Comments
Post a Comment