Created
July 31, 2018 17:20
-
-
Save melPlett/83207f88425aa5bb0aa6447a6260344b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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