Mini Project 10: Displaying stuff from day 7

Dependencies:   DmTouch_UniGraphic UniGraphic mbed

Revision:
11:482a9abbc448
Parent:
10:ee5708e7a36a
Child:
12:bd1d030d5c30
--- a/main.cpp	Tue Jan 17 20:22:49 2017 +0000
+++ b/main.cpp	Tue Jan 17 20:34:32 2017 +0000
@@ -31,6 +31,7 @@
 bool down, lastDown;
 uint16_t tx, ty;
 Timer t; //timer for the touch screen
+float compass_h; //compass heading
 
 void UI() //the general UI code for the touch screen
 {
@@ -60,8 +61,8 @@
         UI(); //sets the the UI
         touch.init(); //initializes touch screen
         t.start(); //starts timer
-        //avg = compass_config();
-        //temperature_config();
+        compass_config();
+        temperature_config();
         //configure_acceleration();
         while(1){
             //myLCD.foreground(Black);
@@ -124,7 +125,9 @@
                             myLCD.locate(160, 100);
                             myLCD.printf("C");
                             myLCD.fillcircle(160,100,30,Green);
-                            
+                            compass_h = compass_n();
+                            myLCD.locate(80, 150);
+                            myLCD.printf("%f degrees N", compass_h);
                             //compass
                         }
                     if (choice == 3) //temperature
@@ -132,7 +135,9 @@
                             myLCD.locate(260, 100);
                             myLCD.printf("T");
                             myLCD.fillcircle(260,100,30,Red);
-                            //temperature
+                            temp2 = temperature();
+                            myLCD.locate(80, 150);
+                            myLCD.printf("%f C", temp2);
                         }
                 }
             wait(0.040);