This is a fork of a functional ILI9341 display with a functional Seeed touch screen library.

Dependencies:   BMP180 UniGraphic mbed BNO055_fusionI_fixed HTU21D GPSISR Compass Fonts uGUI

Fork of TFT_test_NUCLEO-F411RE by Motoo Tanaka

/media/uploads/trevieze/win_20170427_21_31_20_pro.jpg

Had to move sensors to a remote board because of interference. Added spi burst mode to supported displays.

To do.... ugui buttons are slow. will need to add rtos to project. Finish other way points screen. Will have to rewrite portions of the touch screen class. Sense touch, delay, read values and then average, touch released, is the sequence. Add cadence input and logic to program for computer screen.

Revision:
9:a3cb458d7b1c
Parent:
8:855884782f67
Child:
10:869a102dd31c
--- a/main.cpp	Thu Feb 16 23:56:02 2017 +0000
+++ b/main.cpp	Mon Feb 20 19:10:30 2017 +0000
@@ -72,7 +72,6 @@
 #define TARGET_NECLEO_F411RE 
 #endif
 
-
 //DigitalOut backlight(PB_3) ;
 // DigitalOut tsc_cs(PA_9, 1) ;
 // DigitalOut tft_cs(PB_6, 1) ;
@@ -243,37 +242,45 @@
    
 int main()
 {
+    TFT.BusEnable(true) ;
+    TFT.FastWindow(true) ;
+    wait(0.1);
+    TFT.cls();
+    wait(0.1);
     Timer refresh_Timer; //sets up a timer for use in loop; how often do we print GPS info?
-    const int refresh_Time = 1000; //refresh time in ms
+    const int refresh_Time = 2000; //refresh time in ms
     refresh_Timer.start();  //starts the clock on the timer
-    TFT.BusEnable(true) ;
     //backlight = 0 ;
-    TFT.background(White) ;
-    wait(0.1) ;
-    TFT.cls() ;
-    wait(0.1) ;
+    TFT.set_font((unsigned char*) Arial24x23);
+    TFT.fillrect(2, 2, 237, 317, White);
+    TFT.foreground(Blue);
+    TFT.background(White);
+    wait(0.1);
+    
+   
     while (1) { 
      //check if we recieved a new message from GPS, if so, attempt to parse it,
         if (refresh_Timer.read_ms() >= refresh_Time) {
             refresh_Timer.reset();
-            //pc.printf("Time: %f\n", myGPS.time);
-            //MyGPS.getline();
-            //pc.printf("%s", MyGPS.msg[0]);
-            pc.printf("rx_int: %c \n", MyGPS.rx_in);
-            
-            if (MyGPS.isdatardy()) {
+                        
+            if (MyGPS.dataready()) {
+                MyGPS.read();
                 pc.printf("NMEA has valid data");
-                pc.printf("Sats : %d \n", MyGPS.getSats());
+                pc.printf("Sats : %d \n", MyGPS.buffer.satellites);
+                pc.printf("%d-%d-%d\n", MyGPS.buffer.month, MyGPS.buffer.day, MyGPS.buffer.year);
+                pc.printf("%d:%d:%d\n", MyGPS.buffer.hours, MyGPS.buffer.minutes, MyGPS.buffer.seconds);
+                
+                
+                TFT.locate(2, 2) ;
+                TFT.printf("%d-%d-%d", MyGPS.buffer.month, MyGPS.buffer.day, MyGPS.buffer.year);
+                TFT.locate(2, 26) ;
+                TFT.printf("%d:%d:%d", MyGPS.buffer.hours, MyGPS.buffer.minutes, MyGPS.buffer.seconds);
+                                
             }
             else {
                  pc.printf("NMEA has no valid data");
             }     
                 
-            TFT.set_font((unsigned char*) Arial12x12);
-            TFT.foreground(Blue);
-            TFT.locate(2, 2);    
-            //TFT.printf("Time: %f\n", myGPS.time);
-            TFT.BusEnable(false) ;
         }            
     }  
    
@@ -330,4 +337,4 @@
         while(waitTouch != false) ;
         //wait(1) ;
     }
-}
+}
\ No newline at end of file