Looking for a ESP32 TouchScreen Library

ats3788
Posts: 6
Joined: Thu Feb 01, 2018 10:12 am

Looking for a ESP32 TouchScreen Library

Postby ats3788 » Mon Feb 05, 2018 1:10 pm

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.

Cellie
Posts: 34
Joined: Sat Feb 27, 2016 9:47 pm

Re: Looking for a ESP32 TouchScreen Library

Postby Cellie » Tue Feb 06, 2018 3:13 pm

If it is a XPT2046 then this one should work:

https://github.com/PaulStoffregen/XPT2046_Touchscreen

ats3788
Posts: 6
Joined: Thu Feb 01, 2018 10:12 am

Re: Looking for a ESP32 TouchScreen Library

Postby ats3788 » Thu Feb 08, 2018 7:01 pm

#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.

ats3788
Posts: 6
Joined: Thu Feb 01, 2018 10:12 am

Re: Looking for a ESP32 TouchScreen Library

Postby ats3788 » Fri Feb 09, 2018 5:45 pm

What a pitty it does not work :cry:

Duhjoker
Posts: 85
Joined: Mon Mar 20, 2017 8:09 am

Re: Looking for a ESP32 TouchScreen Library

Postby Duhjoker » Fri Feb 09, 2018 7:37 pm

Fear is the mind killer.......

GameR the DIY iot gaming device that does more......
https://github.com/Duhjoker/GameR-Iot_ESP

Who is online

Users browsing this forum: No registered users and 2 guests