add touchscreen calibration
This commit is contained in:
parent
79e2bc982b
commit
a59be3c34a
@ -1,6 +1,8 @@
|
|||||||
#include "SPI.h"
|
#include "SPI.h"
|
||||||
#include "Adafruit_GFX.h"
|
#include "Adafruit_GFX.h"
|
||||||
#include "Adafruit_TFTLCD.h"
|
#include "Adafruit_TFTLCD.h"
|
||||||
|
#include "Adafruit_ImageReader.h"
|
||||||
|
#include <TouchScreen.h>
|
||||||
#include <avr/power.h>
|
#include <avr/power.h>
|
||||||
#include <avr/sleep.h>
|
#include <avr/sleep.h>
|
||||||
#include <avr/wdt.h>
|
#include <avr/wdt.h>
|
||||||
@ -88,11 +90,25 @@ word pinA15 = A15;
|
|||||||
|
|
||||||
Adafruit_TFTLCD tft(LCD_CS, LCD_CD, LCD_WR, LCD_RD, A0);
|
Adafruit_TFTLCD tft(LCD_CS, LCD_CD, LCD_WR, LCD_RD, A0);
|
||||||
|
|
||||||
|
#define YP A4
|
||||||
|
#define XM A5
|
||||||
|
#define YM 30
|
||||||
|
#define XP 31
|
||||||
|
|
||||||
|
#define TS_MINX 100
|
||||||
|
#define TS_MINY 82
|
||||||
|
#define TS_MAXX 812
|
||||||
|
#define TS_MAXY 890
|
||||||
|
|
||||||
|
TouchScreen ts = TouchScreen(XP, YP, XM, YM, 333);
|
||||||
|
|
||||||
|
|
||||||
String outtext = "";
|
String outtext = "";
|
||||||
String oldtext = "";
|
String oldtext = "";
|
||||||
boolean fastboot = false;
|
boolean fastboot = false;
|
||||||
boolean debug = true;
|
boolean debug = true;
|
||||||
|
|
||||||
|
Adafruit_Image img;
|
||||||
// Plant logo
|
// Plant logo
|
||||||
static unsigned const char images_bits[] PROGMEM = {
|
static unsigned const char images_bits[] PROGMEM = {
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user