Tutorial

const int valveA = 6;
const int valveB = 5;

void setup() {
  pinMode(valveA, OUTPUT);
  pinMode(valveB, OUTPUT);
}

void loop() {

  // Phase 1
  digitalWrite(valveA, HIGH);
  digitalWrite(valveB, LOW);
  delay(3000);

  // Phase 2
  digitalWrite(valveA, LOW);
  digitalWrite(valveB, HIGH);
  delay(1500);

}

Recent Comments