FT6206 Library for Adafruit 2.8" TFT Touch Shield for Arduino w/Capacitive Touch

Dependents:   ArchPro_TFT ATT_AWS_IoT_demo_v06 ArchPro_TFT TermProject

Revision:
8:b6e95d327cd3
Parent:
7:3896a0daed43
Child:
9:fff166330146
--- a/FT6206.cpp	Tue Mar 24 01:23:19 2015 +0000
+++ b/FT6206.cpp	Tue Mar 24 01:25:16 2015 +0000
@@ -68,9 +68,14 @@
     while(1) {
         TS_Point p;
         if (FT6206.getTouchPoint(p)) {
-            // Retrieve a point  
-            TS_Point p = FT6206.getPoint();
-            printf("Touch %3d %3d\n", p.x, p.y);
+            X1 = X2;
+            Y1 = Y2;
+            X2 = p.x;
+            Y2 = p.y;
+//            printf("Touch %3d %3d\n", p.x, p.y);
+            if ((X1 > 0) && (Y1 > 0) && (X2 > 0) && (Y2 > 0)) {
+                TFT.line(X1, Y1, X2, Y2, RGB(255,128,255));
+            }
         }
     }
 }