spapadim / xpt2046 Goto Github PK
View Code? Open in Web Editor NEWArduino library for XPT2046 / ADS7843 touchscreen driver
License: MIT License
Arduino library for XPT2046 / ADS7843 touchscreen driver
License: MIT License
Hello,I am using UTFT and your library to creat a GUI on esp8266.
The library works pretty well when not combined with UTFT,but once I put them together,a wdt reset occured as follows:
Exception (0):
epc1=0x40106ecd epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000
ctx: cont
sp: 3fff5e90 end: 3fff60c0 offset: 01a0
stack>>>
3fff6030: 3fff6082 3fff6080 3fff49e8 40206880
3fff6040: 02a20432 00000009 3ffea9d0 3fff5094
3fff6050: 00000001 3fff5068 3fff5068 40206705
3fff6060: 3ffed9bc 00000000 3fff50a0 3fff5094
3fff6070: 3fff49e8 3fff5068 3fff49dc 40209ade
3fff6080: 3ffed998 000007d0 000007d0 3fff5094
3fff6090: 3fffdad0 3fff49dc 3fff508c 40209431
3fff60a0: 3fffdad0 00000000 3fff508c 4020c394
3fff60b0: feefeffe feefeffe 3fff50a0 40100718
<<<stack<<<
ets Jan 8 2013,rst cause:1, boot mode:(3,0)
load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
v09f0c112
~ld
By referring to Xtensa Reference Manual,I find that In this case the exception cause (0) is 'Illegal instruction' .Having added many"Serial.write"to my sketch,it eventually turns out that this line is the cause of trouble:
XPT2046.cpp Line 143: x = (uint16_t)(_cal_dx * (vj - _cal_vj1) / _cal_dvj + CAL_MARGIN);
And the following similar lines are also problematic.
Please help me with this.Thanks.
Hello, thank you for sharing this project with us !
I have some questions about the physical configuration. I am using an ESP82-66-12E board. I made following connections
+5V =>Vin (5V)
GND => GND
MOSI => pin D7
SCK => pin D5
DC => pin D3
CS => pin D8
RST => pin D4
TP_CS => 3.3V (Touch screen disabled)
In the code I modified it to reflect this hardware configuration :
//Ucglib_ILI9341_18x240x320_HWSPI ucg(/cd=/ 2 , /cs=/ 4, /reset=/ 5);
Ucglib_ILI9341_18x240x320_HWSPI ucg(/cd=/ D3 , /cs=/ D8, /reset=/ D4);
XPT2046 touch(/cs=/ D8, /irq=/ 0);
Not sure what the IRQ pin is ? it is not mentioned on my XPT2046 board (see attached picture)
Also not sure about the "cd" pin .. is this "DC" ?
Hello spapadim,
I have created a port using parts of your lib for the NodeMCU framework and would like to merge it with the dev branch - see merge request [1]. As NodeMCU is MIT licensed and your lib is GPL I wanted to ask if you might change the license or at least allow the merge.
Hi, I have the exact same screen and esp and I used your tutorial to connect it all. I'm trying to rotate the touch but I can't seem to understand how to do so. Can you help me? Thanks
Examples work only if you change rows
in the original was so
void setup() {
delay(1000);
ucg.begin(UCG_FONT_MODE_TRANSPARENT);
//ucg.begin(UCG_FONT_MODE_SOLID);
touch.begin(ucg.getWidth(), ucg.getHeight()); // Must be done before setting rotation
ucg.setRotate270();
touch.setRotation(touch.ROT270);
ucg.clearScreen();
but works like this
void setup() {
delay(1000);
ucg.begin(UCG_FONT_MODE_TRANSPARENT);
//ucg.begin(UCG_FONT_MODE_SOLID);
ucg.clearScreen(); // ----- move here---------------------------------------//
touch.begin(ucg.getWidth(), ucg.getHeight()); // Must be done before setting rotation
ucg.setRotate270();
touch.setRotation(touch.ROT270);
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.