Coder Social home page Coder Social logo

arduino-ft6336u's People

Contributors

aselectroworks avatar marcelrobitaille avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

arduino-ft6336u's Issues

read_touch1_weight() not giving data

Hello,
I use your library for a project, but I have a few issues.
I find that the value read_touch1_weight()never gives data.
Also, if the display is at rest, it still shows random touch events with ft6336u.read_touch1_event().
Finally, is it possible to have the display start at x=0 and y = 0 ?
Thanks very much. Attached is a small sketch to demonstrate this on a WT32-SCO1 display. Your library is advised by the manufacturer.

Erik, PA0ESH
WT32-SCO1-ReadTouchParam.ino.ino.zip

FT6336U::FT6336U(int8_t sda, int8_t scl, uint8_t rst_n, uint8_t int_n)

I use ESP32S3 and the code configuration is as follows.

#define I2C_SDA 2
#define I2C_SCL 1
#define RST_N_PIN -1
#define INT_N_PIN -1
FT6336U ft6336u(I2C_SDA, I2C_SCL, RST_N_PIN, INT_N_PIN);

When I looked at the serial port, after each reset, the serial port printed the following, of course, ft6336 is working normally.
E (16) gpio: gpio_set_level(226): GPIO output gpio_num error
E (26) gpio: gpio_set_level(226): GPIO output gpio_num error

I checked the FT6336U.cpp file. The problem is with the function digitalWrite(rst n, X).
It is located on lines 44 and 46.
I printed the values for rst_n and int_n and found that they were both 255, not -1.
So. I submit feedback to you.

Compile errors using vscode

When compiling it mainly complains about the order of the variable declarations
Swapping line 192 and 193 in the header file fixes the issue.

Compile log:

In file included from lib\Arduino-FT6336U\src\FT6336U.cpp:9:0:
lib\Arduino-FT6336U\src\FT6336U.h:127:14: warning: extra tokens at end of #ifdef directive
#ifdef ESP32 || ESP8266
^
lib\Arduino-FT6336U\src\FT6336U.cpp:16:14: warning: extra tokens at end of #ifdef directive
#ifdef ESP32 || ESP8266
^
In file included from lib\Arduino-FT6336U\src\FT6336U.cpp:9:0:
lib\Arduino-FT6336U\src\FT6336U.h: In constructor 'FT6336U::FT6336U(uint8_t, uint8_t)':
lib\Arduino-FT6336U\src\FT6336U.h:193:22: error: 'FT6336U::rst_n' will be initialized after [-Werror=reorder]
uint8_t rst_n = -1;
^
lib\Arduino-FT6336U\src\FT6336U.h:192:22: error: 'uint8_t FT6336U::int_n' [-Werror=reorder]
uint8_t int_n = -1;
^
lib\Arduino-FT6336U\src\FT6336U.cpp:13:1: error: when initialized here [-Werror=reorder]
FT6336U::FT6336U(uint8_t rst_n, uint8_t int_n)
^
In file included from lib\Arduino-FT6336U\src\FT6336U.cpp:9:0:
lib\Arduino-FT6336U\src\FT6336U.h: In constructor 'FT6336U::FT6336U(uint8_t, uint8_t, uint8_t, uint8_t)':
lib\Arduino-FT6336U\src\FT6336U.h:193:22: error: 'FT6336U::rst_n' will be initialized after [-Werror=reorder]
uint8_t rst_n = -1;
^
lib\Arduino-FT6336U\src\FT6336U.h:192:22: error: 'uint8_t FT6336U::int_n' [-Werror=reorder]
uint8_t int_n = -1;
^
lib\Arduino-FT6336U\src\FT6336U.cpp:17:1: error: when initialized here [-Werror=reorder]
FT6336U::FT6336U(uint8_t sda, uint8_t scl, uint8_t rst_n, uint8_t int_n)
^
lib\Arduino-FT6336U\src\FT6336U.cpp: In member function 'uint8_t FT6336U::readByte(uint8_t)':
lib\Arduino-FT6336U\src\FT6336U.cpp:254:12: warning: 'rdData' may be used uninitialized in this function [-Wmaybe-uninitialized]
return rdData;
^
cc1plus.exe: some warnings being treated as errors
In file included from src\main.cpp:15:0:
lib/Arduino-FT6336U/src/FT6336U.h:127:14: warning: extra tokens at end of #ifdef directive
#ifdef ESP32 || ESP8266
^

How to Rotate the touch input?

I am using a WT32-SC01 board. I have this working with TFT_eSPI library for display and your library for touch. I need to rotate the touch input to match the screen rotation. How may I do that? Still seems to be some minor issues but none that affect me at the moment. I just need X and Y of the touch. The current rotation is where the power connector is on the left of the WT32. I don't see any routine for rotation.

Thanks for the library!!

Mike

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.