No worries! I just want to make things work! ![]()
Silas, in regards to your example, I think I see your point now.
So here is my modified code. The loop is limited to 1 switch at the moment for simplicity. (My logic of adding stuff till it breaks or doesn't work!)
This works as said, but when I release switch 1, it doesn't turn off the outputs. I can't at the moment figure out why? What am I missing?
// Digital Input Pin Constants
const int S1 = 2;Â Â // Float Switch 1
const int S2 = 3;Â Â // Float Switch 2
const int S3 = 4;Â Â // Manual Switch 1
// Digital Output Pin Constants
const int K1 = 8;Â Â // Relay K1 - Solenoid for Tank 1
const int K2 = 9;Â Â // Relay K2 - Solenoid for Tank 2
const int K3 = 10;Â // Relay K3 - Solenoid for Manual Use
const int K4 = 11;Â // Relay K4 - Water Pump Relay
// Variables
int curS;
void setup() {
 // Initialize the pins, define digital I/O Pin Use
 pinMode(S1, INPUT);
 pinMode(S2, INPUT);
 pinMode(S3, INPUT);
 pinMode(K1, OUTPUT);
 pinMode(K2, OUTPUT);
 pinMode(K3, OUTPUT);
 pinMode(K4, OUTPUT);
 digitalWrite(S1, HIGH);
 digitalWrite(S2, HIGH);
 digitalWrite(S3, HIGH);
 Serial.begin(9600);
}
void loop() {
 if (digitalRead(S1) == LOW && curS == 0)
 {
  Serial.print("Filling Tank 1");
  digitalWrite(K1, HIGH);
  delay(3000);
  digitalWrite(K4, HIGH);
  curS = S1;Â
 }
 else if (digitalRead(S1) == HIGH && curS == 1)
 {
  digitalWrite(K4, LOW);
  delay(3000);
  digitalWrite(K1, LOW);
  curS = 0;
 }
}