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

any one? :(


Arduino Forum > Using Arduino > Project Guidance > RTC come on when time = now and stay on until time = now


arduino

Comments

Popular posts from this blog

opencv3, tbb and rasp pi 2 - Raspberry Pi Forums

small ethernet problem - Raspberry Pi Forums

Multithumb configuration params not working? - Joomla! Forum - community, help and support