Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
int sValve_0 = 1;
int sValve_1 = 2;
int sValve_2 = 3;
int pump = 8;
void setup() {
Serial.begin(9600);
pinMode(sValve_0, OUTPUT);
pinMode(sValve_1, OUTPUT);
pinMode(sValve_2, OUTPUT);
pinMode(pump, OUTPUT);
}
void loop() {
digitalWrite(sValve_0, LOW);
Serial.print("0 on");
Serial.println();
digitalWrite(sValve_0, HIGH);
delay(500);
digitalWrite(sValve_0, LOW);
delay(500);
digitalWrite(sValve_1, LOW);
Serial.print("1 on");
Serial.println();
digitalWrite(sValve_1, HIGH);
delay(500);
digitalWrite(sValve_1, LOW);
delay(500);
digitalWrite(sValve_2, LOW);
Serial.print("2 on");
Serial.println();
digitalWrite(sValve_2, HIGH);
delay(500);
digitalWrite(sValve_2, LOW);
delay(500);
digitalWrite(pump, LOW);
Serial.print("pump on");
Serial.println();
digitalWrite(pump, HIGH);
delay(500);
digitalWrite(pump, LOW);
delay(500);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.