Untitled

mail@pastecode.io avatar
unknown
c_cpp
a year ago
710 B
6
Indexable
Never
if ( hum < 40  ){
    digitalWrite(Relay1,HIGH);
    Relay_1 = true;
  }
  else { 
    digitalWrite(Relay1,LOW);
    Relay_1 = false;
  }
  if ( hum < 40){
    digitalWrite(Relay2,HIGH);
    Relay_2 = true;
  }
  else { 
    digitalWrite(Relay2,LOW);
    Relay_2 = false;
  }  
  if ( hum < 40){
    digitalWrite(Relay3,HIGH);
    Relay_3 = true;
  }
  else { 
    digitalWrite(Relay3,LOW);
    Relay_3 = false;
  }
  if (Relay_1   || Relay_2   || Relay_3 ){
    digitalWrite(Relay4,HIGH);
  }
  else { 
    digitalWrite(Relay4,LOW);
  }
  if (strstr(x->description, "rain") != NULL) {
  digitalWrite(Relay4, LOW);
  }
  if (x->speed > 30) {
  digitalWrite(Relay4, HIGT);
  }