wip
This commit is contained in:
parent
ea5608dac3
commit
e947237931
@ -9,10 +9,12 @@
|
||||
|
||||
|
||||
|
||||
#define AOUT_PIN A0
|
||||
#define AOUT_PIN A7
|
||||
|
||||
#define LED_POWER 12
|
||||
#define LED_ALERT 4
|
||||
#define LED_POWER 12
|
||||
#define LED_POW_G 11
|
||||
#define LED_ALERT 10
|
||||
#define LED_ALE_G 9
|
||||
|
||||
|
||||
#define THRESHOLD 530 // CHANGE YOUR THRESHOLD HERE
|
||||
@ -24,7 +26,13 @@ void setup() {
|
||||
|
||||
Serial.begin(9600);
|
||||
|
||||
|
||||
// Set to LOW to use as ground
|
||||
pinMode( LED_POWER, OUTPUT);
|
||||
pinMode( LED_POW_G, OUTPUT);
|
||||
pinMode( LED_ALERT, OUTPUT);
|
||||
pinMode( LED_ALE_G, OUTPUT);
|
||||
digitalWrite(LED_POW_G , LOW);
|
||||
digitalWrite(LED_ALE_G , LOW);
|
||||
|
||||
}
|
||||
|
||||
@ -46,18 +54,13 @@ void loop() {
|
||||
Serial.println(")");
|
||||
|
||||
|
||||
delay(500);
|
||||
// Stay up a bit longer for display
|
||||
delay(100);
|
||||
|
||||
|
||||
digitalWrite(LED_POWER, LOW);
|
||||
digitalWrite(LED_ALERT, LOW);
|
||||
|
||||
delay(10000);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
C1 : humidité du sol
|
||||
C2 : remplissage du réservoir
|
||||
|
||||
I1 : Circuit alimenté si On
|
||||
I2 : Substrat sec si On
|
||||
I3 : Réservoir vide si On
|
||||
|
||||
P1 : Pompe réservoir -> substrat
|
||||
|
||||
*/
|
@ -70,6 +70,7 @@ void loop() {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Serial.println("Sleeeping");
|
||||
delay(DURATION_DELAY * SECOND);
|
||||
Serial.println("Slept");
|
Loading…
Reference in New Issue
Block a user