2019.03.25(am): Smart Farm Water Module Arduino

Mills function

 unsigned long preMills = 0;

void setup() 
{
  pinMode(13, OUTPUT);
}

void loop() 
{
   unsigned long Mills = millis();
    
  if(Mills - preMills < 2000000)
    {
      digitalWrite(13, HIGH);   
      delay(10000); // 10초 off              
      digitalWrite(13, LOW);    
      delay(10000); // 10초 on
    }
    else // 30분 이후로
    {
      digitalWrite(13, HIGH);       // off     
   
    }       
  
}      

2019 03 25 Smart Farm Water Module Arduino