Skip to content

Commit 7f23ee1

Browse files
committed
Fixed Touchscreen Lib
Changed example to use the Touchscreen Library that has STM32 support.
1 parent 664c8c5 commit 7f23ee1

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

STM32F1/libraries/Adafruit_ILI9341_STM/examples/breakouttouchpaint/breakouttouchpaint.ino

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,22 @@
1515

1616
/** NOT FOR USE WITH THE TOUCH SHIELD, ONLY FOR THE BREAKOUT! **/
1717

18-
#include <Adafruit_GFX.h> // Core graphics library
18+
#include <Adafruit_GFX_AS.h> // Core graphics library
1919
#include <SPI.h>
2020
#include <Adafruit_ILI9341_STM.h>
21-
#include "TouchScreen.h"
21+
#include <TouchScreen_STM.h>
2222

2323
// These are the four touchscreen analog pins
24-
#define YP A2 // must be an analog pin, use "An" notation!
25-
#define XM A3 // must be an analog pin, use "An" notation!
26-
#define YM 5 // can be a digital pin
27-
#define XP 4 // can be a digital pin
24+
#define YP PB0 // must be an analog pin
25+
#define XM PA3 // must be an analog pin
26+
#define YM PB7 // can be a digital pin
27+
#define XP PC13 // can be a digital pin
2828

2929
// This is calibration data for the raw touch data to the screen coordinates
30-
#define TS_MINX 150
31-
#define TS_MINY 120
32-
#define TS_MAXX 920
33-
#define TS_MAXY 940
30+
#define TS_MINX 3670
31+
#define TS_MINY 3790
32+
#define TS_MAXX 640
33+
#define TS_MAXY 300
3434

3535
#define MINPRESSURE 10
3636
#define MAXPRESSURE 1000

0 commit comments

Comments
 (0)