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
Diff: FT6206.cpp
- Revision:
- 10:535d2140db2c
- Parent:
- 9:fff166330146
- Child:
- 11:9e1fc2233b0e
--- a/FT6206.cpp Tue Mar 24 01:27:58 2015 +0000 +++ b/FT6206.cpp Tue Mar 24 01:31:42 2015 +0000 @@ -65,7 +65,20 @@ int main() { + //Configure the display driver + TFT.claim(stdout); + TFT.background(Black); + TFT.foreground(White); + TFT.set_orientation(LANDSCAPE); + TFT.cls(); + + //Print a welcome message + TFT.set_font((unsigned char*) Arial12x12); + TFT.locate(0,0); + TFT.printf("Hello mbed!\n"); + while(1) { + int X1, Y1, X2, Y2; TS_Point p; if (FT6206.getTouchPoint(p)) { X1 = X2; @@ -89,6 +102,7 @@ m_addr = (FT6206_ADDR << 1); m_i2c.frequency(FT6206_I2C_FREQUENCY); m_interrupt.mode(PullUp); + init(); } FT6206::~FT6206()