Skip to content

Commit

Permalink
Fixes #24
Browse files Browse the repository at this point in the history
  • Loading branch information
krismaz committed Jan 2, 2018
1 parent 6c611af commit 8bf204d
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions SSR.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
#define SSR_PINb 9
#define SSR_PINc 10

#define LED_PINa 22
#define LED_PINb 24
#define LED_PINc 26
#define LED_PINd 28
#define LED_PINe 30


#define PUMP_PIN 11

inline void SSRInit()
Expand All @@ -30,6 +37,13 @@ inline void SSROff()
digitalWrite(SSR_PINa, LOW);
digitalWrite(SSR_PINb, LOW);
digitalWrite(SSR_PINc, LOW);

digitalWrite(LED_PINa, LOW);
digitalWrite(LED_PINb, LOW);
digitalWrite(LED_PINc, LOW);
digitalWrite(LED_PINd, LOW);
digitalWrite(LED_PINe, LOW);

}

inline void SSRPhase(float diff)
Expand All @@ -40,16 +54,21 @@ inline void SSRPhase(float diff)
digitalWrite(SSR_PINa, HIGH);
digitalWrite(SSR_PINb, HIGH);
digitalWrite(SSR_PINc, HIGH);
digitalWrite(LED_PINa, LOW);
} else if (diff > 3.0f){
digitalWrite(SSR_PINb, HIGH);
digitalWrite(SSR_PINc, HIGH);
digitalWrite(LED_PINb, LOW);
} else if (diff > 1.5f){
digitalWrite(SSR_PINa, HIGH);
digitalWrite(SSR_PINb, HIGH);
digitalWrite(LED_PINc, LOW);
} else if (diff > 0.5f){
digitalWrite(SSR_PINc, HIGH);
digitalWrite(LED_PINd, LOW);
} else {
digitalWrite(SSR_PINb, HIGH);
digitalWrite(LED_PINe, LOW);
}
}
}
Expand Down

0 comments on commit 8bf204d

Please sign in to comment.