Plant Monitoring Project

Dependencies:   mbed SHT21_ncleee WakeUp SSD1306 DHT Adafruit_TCS34725 DS1820

Revision:
32:4bb8ec535357
Parent:
31:45f4bfde0b9a
Child:
33:b576ea9bf0e3
--- a/main.cpp	Thu Dec 12 16:01:01 2019 +0000
+++ b/main.cpp	Thu Dec 12 16:25:33 2019 +0000
@@ -2,6 +2,10 @@
 
 
 int main(){
+    #ifdef INTERRUPTEUR
+    interrupteur = 1;
+    #endif
+    
     #ifdef OLED
     bouton.rise(interruption_bouton);
     initOLED();
@@ -120,6 +124,10 @@
 #endif
 
 void readData(void){
+    #ifdef INTERRUPTEUR
+    interrupteur = 1;
+    wait_ms(100);
+    #endif
     #ifdef DEBUG
     pc.printf("Reading Data\n\r");
     #endif
@@ -147,6 +155,10 @@
     if(oled_on)
         oledData();
     #endif
+    #ifdef INTERRUPTEUR
+    wait(8);                // Il faut du temps au module SigFox pour envoyer les données
+    interrupteur = 0;
+    #endif
 }
 
 void interruption_bouton(){