PRO2_Team 1_collected code with ticker_not working yet
Fork of PRO2_samlet_kode by
Diff: main.cpp
- Revision:
- 3:b6c7d01e1eb8
- Parent:
- 2:0864be57f81e
- Child:
- 4:eb483906704a
--- 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);