![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
newest
Dependencies: BME280 BMP280 TextLCD mbed
Fork of CW_watchdog_08012018 by
Diff: main.cpp
- Revision:
- 1:dc21a6fce3af
- Parent:
- 0:7023c3f98f36
- Child:
- 2:c696dfd53eeb
--- a/main.cpp Sat Jan 06 17:28:05 2018 +0000 +++ b/main.cpp Mon Jan 08 18:46:57 2018 +0000 @@ -1,6 +1,6 @@ #include "mbed.h" #include "TextLCD.h" -#include "BMP280.h" +#include "BME280.h" #include "putty.h" //DigitalOut myled(LED1); int dislcd = 0; @@ -25,7 +25,7 @@ lcd.locate(0,0); lcd.printf("p:%3.1f", pressuref); lcd.locate(10,1); - lcd.printf("t:%3.1f", tempf); + lcd.printf("t:%2.1f", tempf); display_time(); } @@ -38,9 +38,17 @@ void lcddisp() { - display_time(); - getdata(); - store(); + if (gather_data == 1) + { + display_time(); + getdata(); + store(); + + } + if (gather_data ==0) + { + + } } void check_display() @@ -71,13 +79,13 @@ { check_display(); putty_write(); - if (interrupt == 1); + check_display(); + if (interrupt == 1) { T = t; display.attach(&lcddisp, T); - interrupt =0; + interrupt = 0; } - check_display(); } }