C Principle


i got little question...

when writing code in void loop() function if 2 if conditions correct in same time, execute together?
for example:

code: [select]


void setup()
{

   time_t startruningtime = now();

}



void loop()
{  
   time_t t = now();


if(limitswitch == high) {draincleanflag = 1;}
 

if(draincleanflag == 1)
{

      digitalwrite(tankdrainvalve, high);
      delay(10000);
      digitalwrite(tankdrainvalve, low);
      delay(250);
      draincleanflag = 1;
}




if(month(t) -  month(startruningtime) ==  0)
{
      if(hour(t) >= 6 && hour(t) <= 0) { digitalwrite(hpslamp, high);}
      else { digitalwrite(hpslamp, low); }
   
}



thanks helpers

quote
when writing code in void loop() function if 2 if conditions correct in same time, execute together?

if mean "at same time", answer no.

you need have @ blinkwithoutdelay example.


Arduino Forum > Forum 2005-2010 (read only) > Software > Syntax & Programs > C Principle


arduino

Comments

Popular posts from this blog

CAN'T INSTALL MAMBELFISH 1.5 FROM DIRECTORY - Joomla! Forum - community, help and support

error: expected initializer before 'void'

CPU load monitoring using GPIO and leds - Raspberry Pi Forums