alex-code / gt911 Goto Github PK
View Code? Open in Web Editor NEWGT911 Touch library for Arduino
License: MIT License
GT911 Touch library for Arduino
License: MIT License
Hello -- I've been trying to get this same screen to work in interrupt mode. Does your library work for that? You mentioned in the readme that other libraries use interrupt mode -- did you ever get anything from the interrupt pin?
Here's the code I am trying:
#include <Arduino.h>
#include <GT911.h>
GT911 ts = GT911();
void setup() {
Serial.begin(115200);
ts.begin(15,26);
}
void loop() {
uint8_t touches = ts.touched(GT911_MODE_INTERRUPT);
if (touches) {
GTPoint* tp = ts.getPoints();
for (uint8_t i = 0; i < touches; i++) {
Serial.printf("#%d %d,%d s:%d\n", tp[i].trackId, tp[i].x, tp[i].y, tp[i].area);
}
}
}
This works fine in GT911_MODE_POLLING, but nothing happens in interrupt mode.
Reading through the docs/schematics, it seems like the GT911 INT line may only get to like 1.5V, and I'm wondering if that might have something to do with this conundrum. Thanks for any insight!
Arduino: 1.8.19 (Linux), Board: "ESP32 Dev Module, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 921600, None"
#include <GT911.h>
GT911 ts = GT911();
setup(){
ts.begin();
ts.setRotation(1);
.....
no matching function for call to GT911::setRotation(int)
I have tried 180 and 1 and nothing works.
I have version 0.2.1.
Hi Alex,
Thanks for putting this up.
I'm a bit out of my depth with this tech. I'm trying to get the same DFRobot capacitive touch screen working and came across similar issues to what a lot of people seem to be encountering - the INT pin not working.
I'm trying to get a minimal polling solution going with platformio, teensy 4.1. Essentially just what you have in the readme.
I get a few errors:
lib/GT911/GT911.cpp:93:19: error: '_min' was not declared in this scope; did you mean 'min'?
and
lib/GT911/GT911.cpp:93:38: error: 'I2C_BUFFER_LENGTH' was not declared in this scope; did you mean 'BUFFER_LENGTH'?
I tried changing to min
and added #define I2C_BUFFER_LENGTH 32
but get no printing in the serial monitor.
Would you be able to include a minimal example in the repo?
Thanks.
hi, Thanks for the cool library. Just a quick question please - Is there an example on how to use the interrupts? Cheers.
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.