rcluze 4 лет назад
Родитель
Сommit
192c501803
1 измененных файлов с 12 добавлено и 12 удалено
  1. 12 12
      Soft/MCUnode/PeristatiqueV2/PeristatiqueV2.ino

+ 12 - 12
Soft/MCUnode/PeristatiqueV2/PeristatiqueV2.ino

@@ -52,17 +52,17 @@ float ML3 = 0.0;
 float ML4 = 0.0;
 
 
-float nbMLTest = 0.0;
+float nbMLTest = 2.0;
 
 bool AUTO1 = false;
 bool AUTO2 = false;
 bool AUTO3 = false;
 bool AUTO4 = false;
 
-#define H1 0
-#define H2 6
-#define H3 12
-#define H4 18
+#define H1 0*60
+#define H2 6*60
+#define H3 12*60
+#define H4 18*60
 
 //************************************************************************
 //                Fonction
@@ -77,7 +77,7 @@ void Active1(float ml) {
     Serial.print(ml);
     Serial.println("ml");
     sprintf(message, "Distribution %.1fml de calcium", ml);
-    Blynk.notify(message);
+    //Blynk.notify(message);
   }
 }
 
@@ -92,7 +92,7 @@ void Active2(float ml) {
     Serial.print(ml);
     Serial.println("ml");
     sprintf(message, "Distribution %.1fml de KH", ml);
-    Blynk.notify(message);
+    //Blynk.notify(message);
   }
 }
 
@@ -106,7 +106,7 @@ void Active3(float ml) {
     Serial.print(ml);
     Serial.println("ml");
     sprintf(message, "Distribution %.1fml de Iode", ml);
-    Blynk.notify(message);
+    //Blynk.notify(message);
   }
 }
 
@@ -120,12 +120,13 @@ void Active4(float ml) {
     Serial.print(ml);
     Serial.println("ml");
     sprintf(message, "Distribution %.1fml de Pompe4", ml);
-    Blynk.notify(message);
+    //Blynk.notify(message);
   }
 }
 
 void Ft_Timer() {
   int Hmin = hour() * 60 + minute();
+  Serial.println(Hmin);
   switch (Hmin) {
     case ( H1):
       Active1(ML1);
@@ -326,6 +327,7 @@ void setup()
 {
   // Debug console
   Serial.begin(9600);
+  Serial.println("Start");
 
   //Pin Setup
   pinMode(PINPOMPE1, OUTPUT);
@@ -344,9 +346,7 @@ void setup()
 
   setSyncInterval(10 * 60); // interval de syncro de la RTC (10 min)
 
-  timer.setInterval(600000L, Ft_Timer);
-
-
+  timer.setInterval(60000L, Ft_Timer);
 }
 
 void loop()