PRO2_Team 1_collected code with ticker_not working yet

Dependencies:   SHTx mbed

Fork of PRO2_samlet_kode by Software hold - Team 1 - PRO2 2017

Files at this revision

API Documentation at this revision

Comitter:
OlgaHoeyer
Date:
Fri May 19 11:12:46 2017 +0000
Parent:
2:0864be57f81e
Child:
4:eb483906704a
Commit message:
tick syntax corrected

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Fri May 19 10:59:26 2017 +0000
+++ b/main.cpp	Fri May 19 11:12:46 2017 +0000
@@ -10,10 +10,10 @@
 
 //Declaration of GLOBAL VARIABLES:
 float temperature, humidity;            //this will be data read from sensor
-void GetTemperatureAndHumidity();        //via denne function
+void GetTemperatureAndHumidity();       //via denne function
 
-int temperature_low :=18;
-int temperature_high :=22;  //DELETE LATER!
+int temperature_low=18;     //DELETE LATER!
+int temperature_high=22;    //DELETE LATER!
 
 Serial pc(USBTX, USBRX);
 InterruptIn event(USER_BUTTON);
@@ -34,13 +34,12 @@
 
         //tick1.atach(Settings(), 20);        //MISSING PROGRAM PART!!!!!!!
 
-        tick2.atach(GetTemperatureAndHumidity(),20);        //Data Collection
-
-        //tick3.atach(Compare_values(hum, temp, temperature_low, temperature_high),20); //Data Analysis
+        tick2.attach(GetTemperatureAndHumidity(),20);        //Data Collection
 
-        tick4.atach(rgb_outp(Compare_values(hum, temp, temperature_low, temperature_high)),20);                  //RGB_LED_output
+        tick3.attach(Compare_values(humidity, temperature, temperature_low, temperature_high),20); //Data Analysis
 
-        return;
+        tick4.attach(rgb_outp(Compare_values(humidity, temperature, temperature_low, temperature_high)),20);                  //RGB_LED_output
+
     }
 }
 
@@ -52,9 +51,9 @@
     sensor.setOTPReload(false);
     sensor.setResolution(true);
 
-    busy = true;
+    //busy = true;
     sensor.update();
-    busy = false;
+    //busy = false;
 
     // Temperature in celcius
     sensor.setScale(false);