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:
14:b174ec6e3ca0
Parent:
4:25554dc066a0
Child:
17:4f10efd72d9d
Child:
18:50520438c129
--- a/SeeedStudioTFTv2.h	Fri Mar 03 02:56:25 2017 +0000
+++ b/SeeedStudioTFTv2.h	Wed Apr 12 20:30:06 2017 +0000
@@ -19,6 +19,17 @@
 #define __PRESURE 1000
 #define RXPLATE   300
 
+//Measured ADC values for (0,0) and (210-1,320-1)
+//TS_MINX corresponds to ADC value when X = 0
+//TS_MINY corresponds to ADC value when Y = 0
+//TS_MAXX corresponds to ADC value when X = 240 -1
+//TS_MAXY corresponds to ADC value when Y = 320 -1
+
+#define TS_MINX 10500  //116*2
+#define TS_MAXX 116252 //890*2
+#define TS_MINY 12500  //83*2
+#define TS_MAXY 116044 //913*2
+
 struct point {
     int x;
     int y;
@@ -39,7 +50,8 @@
      * based on my SPI_TFT lib
      */
     TouchScreen(PinName xp, PinName xm, PinName yp, PinName ym);
-void getTouch(point& p);
+        void getTouch(point& p);
+        long map(long x, long in_min, long in_max, long out_min, long out_max);
 protected:
     PinName _xm;
     PinName _ym;
@@ -49,7 +61,6 @@
 
     typedef enum { YES, MAYBE, NO } TOUCH;
     int readTouch(PinName p, PinName m, PinName a, PinName i);
-
     int x_off,y_off;
     int pp_tx,pp_ty;
 };