generic touch support for resistive chips
unzip the Doxygen docu in docs for additional documentation
generic touch support for resistive chips
#include <SPI.h>
#include <TFT_eSPI.h>
#include <TFT_eTouch.h>
// Its difficult to have two spi at the same time, i have to create virtual spi for touchscreen
// SPI of the LCD and the XPT2046 are not in the same bus
// ESP32-2432S028
// LCD is working fine
TFT_eSPI tft = TFT_eSPI(); // Invoke custom library
auto vspi = new SPIClass(VSPI);
TFT_eTouch<TFT_eSPI> touch(tft, 33, 36, *vspi);
void setup() {
Serial.begin( 115200 );
vspi->begin(25, 39, 32, 33);
vspi->setFrequency( 60000000 );
pinMode(vspi->pinSS(), OUTPUT);
tft.init();
touch.init();
``
//RIGHT COLORS
tft.writecommand(TFT_MADCTL);
tft.writedata(0x40);
tft.fillScreen(TFT_BLACK);
tft.drawRect(0, 0, tft.width(), tft.height(), TFT_GREEN);
Serial.println("Config ended");
}
void loop() {
int16_t x = 0;
int16_t y = 0;
// Never entry here
if (touch.getXY(x, y)) {
Serial.print(x);
Serial.print(" ");
Serial.println(y);
}
}
I have tried to create a VSPI bus but only screen is working.
TFT_eTouchUser.h : Lines 68-70
#error undef TOUCH_CS in TFT_eSPI UserSetup.h for using TFT_eTouch
ifdef should be ifndef
Platform:ESP8266 RAW.ino
on TFT_eSPI can work fine but use this lib can not work
if used IRQ PIN 10 ,ESP8266 reboot repeat
not use IRQ no response
ISR not in IRAM!
User exception (panic/abort/assert)
Abort called
stack>>>
ctx: cont
sp: 3ffffee0 end: 3fffffc0 offset: 0000
3ffffee0: ffffffff 3fffc6fc 00000578 00000578
3ffffef0: 000000fe 00000000 00000000 00000000
3fffff00: 00000000 00000000 00000000 00ff0000
3fffff10: 5ffffe00 5ffffe00 40209968 00000000
3fffff20: 00000002 0000000a 3ffee970 402090de
3fffff30: 4010046e 00000fa0 00000078 402090f0
3fffff40: 40100268 3ffee9b4 3ffee970 40209606
3fffff50: 00000000 3ffefa3c 3ffefa34 4020a33d
3fffff60: 00000000 3ffeec9c 3ffeec9c 000000ff
3fffff70: 3ffeeab8 3ffee9b4 3ffee970 402096b8
3fffff80: 3ffeeab8 3ffee9b4 3ffee970 40205371
3fffff90: feefeffe feefeffe feefeffe 3ffeeb20
3fffffa0: 3fffdad0 00000000 3ffeeae0 40208d40
3fffffb0: feefeffe feefeffe 3ffe84e0 40100dcd
<<<stack<<<
ets Jan 8 2013,rst cause:2, boot mode:(3,6)
Hi there.
There was a bug which After micros() overflow (about 70 minutes ) it did not work anymore.
Easy fix have done in PL#3 #3
Info:
https://www.norwegiancreations.com/2018/10/arduino-tutorial-avoiding-the-overflow-issue-when-using-millis-and-micros/
Using the calibrate.ino program, when I move up in the Y direction the cursor moves down.
And when I move horizontally left, the cursor moves right. Both are opposite.
I have not figured out how to change this in either the ino program or the library.
Based on the comments, I think it should be easy, but I just can't figure it out.
Can you point me to what needs to be changed?
The calibrate sketch puts marker on the screen then the ESP8266 reboots on the watchdog.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.