Page 1 of 1

Looking for a ESP32 TouchScreen Library

Posted: Mon Feb 05, 2018 1:10 pm
by ats3788
Hello friends of the ESP32
This is working for the ESP32, but I could not find a Lib to use the Touchscreen.
https://github.com/MartyMacGyver/ESP32_Adafruit_ILI9341
Does someone know a Library working Touchscreen Lib for the ESP32.

Re: Looking for a ESP32 TouchScreen Library

Posted: Tue Feb 06, 2018 3:13 pm
by Cellie
If it is a XPT2046 then this one should work:

https://github.com/PaulStoffregen/XPT2046_Touchscreen

Re: Looking for a ESP32 TouchScreen Library

Posted: Thu Feb 08, 2018 7:01 pm
by ats3788
#include <XPT2046_Touchscreen.h>
#include <SPI.h>

#define CS_PIN 8
// MOSI=11, MISO=12, SCK=13

//XPT2046_Touchscreen ts(CS_PIN);
#define TIRQ_PIN 2
//XPT2046_Touchscreen ts(CS_PIN); // Param 2 - NULL - No interrupts
//XPT2046_Touchscreen ts(CS_PIN, 255); // Param 2 - 255 - No interrupts
XPT2046_Touchscreen ts(CS_PIN, TIRQ_PIN); // Param 2 - Touch IRQ Pin - interrupt enabled polling

void setup() {
Serial.begin(38400);
ts.begin();
ts.setRotation(1);
while (!Serial && (millis() <= 1000));
}

void loop() {
if (ts.touched()) {
TS_Point p = ts.getPoint();
Serial.print("Pressure = ");
Serial.print(p.z);
Serial.print(", x = ");
Serial.print(p.x);
Serial.print(", y = ");
Serial.print(p.y);
delay(30);
Serial.println();
}
}
Thank you
I can compile this but I don't knew yet, if is working, I write this down later.

Re: Looking for a ESP32 TouchScreen Library

Posted: Fri Feb 09, 2018 5:45 pm
by ats3788
What a pitty it does not work :cry:

Re: Looking for a ESP32 TouchScreen Library

Posted: Fri Feb 09, 2018 7:37 pm
by Duhjoker