Keiarash Zoughi's Multi-Sensor for weather detection.

Dependencies:   BMP180 N5110 mbed

Revision:
5:e75537898d23
Parent:
4:47b0473fa81b
Child:
6:07133c44d3eb
--- a/main.cpp	Thu May 07 16:02:05 2015 +0000
+++ b/main.cpp	Thu May 07 16:23:29 2015 +0000
@@ -146,10 +146,11 @@
        
 //
         float pressure = measurement.pressure;  // same idea with floats
-        length = sprintf(buffer,"P = %.2f mb",pressure);
+        int length = sprintf(buffer,"P = %.2f mb",pressure);
         if (length <= 14)
             lcd.printString(buffer,0,2);  
-
+}
+}
 
 
 
@@ -233,8 +234,11 @@
 
         lcd.drawRect(70,6,10,10,1);
         lcd.drawRect(70,21,10,10,0);
+        lcd.drawRect(70,37,10,10,0);//check box 3
+        lcd.printString("temperature",1,1);
+                lcd.printString("altitude",1,3);
+        lcd.printString("pressure",1,5);
 
-        lcd.printString("temperature",1,1);
         lcd.printString(">",62,1);
         selectedOption = 1;
 if (pushbutton1)
@@ -244,6 +248,10 @@
 
         lcd.drawRect(70,6,10,10,0);
         lcd.drawRect(70,21,10,10,1);
+                lcd.drawRect(70,37,10,10,0);//check box 3
+        lcd.printString("temperature",1,1);
+        lcd.printString("pressure",1,5);
+
         lcd.printString("altitude",1,3);
         lcd.printString(">",62,3);
         selectedOption = 2;
@@ -252,11 +260,14 @@
         wait(2);
         lcd.clear();
 
-lcd.drawRect(70,6,10,10,0);
-        lcd.drawRect(70,21,10,10,1);
-        lcd.printString("pressure",1,3);
-        lcd.printString(">",62,3);
-        selectedOption = 2;
+        lcd.drawRect(70,6,10,10,0);
+        lcd.drawRect(70,21,10,10,0);
+        lcd.drawRect(70,37,10,10,1);//check box 3
+lcd.printString("temperature",1,1);
+                lcd.printString("altitude",1,3);
+        lcd.printString("pressure",1,5);
+        lcd.printString(">",62,5);
+        selectedOption = 3;
 if (pushbutton1)
             break;
         wait(2);
@@ -334,7 +345,7 @@
 
     if(selectedOption == 2) {
 
-        lcd.clear();
+        check();
 
     }
 }