aselectroworks / Arduino-FT6336U

FocalTech FT6336U (Self-Capacitive Touch Panel Controller) library for Arduino.
MIT License
38 stars 10 forks source link

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

Open Zhentao-Lin opened 1 year ago

Zhentao-Lin commented 1 year ago

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.

pistojim commented 10 months ago

at STM32f103 needs only : FT6336U ft6336u(RST_N_PIN, INT_N_PIN);

asasaki-shiftall commented 10 months ago

This library needs to set the REAL gpio num for RST_N and INT_N. It means I assume the circuit will connect RST_N and INT_N to FT6336U. But I did not write error handling. So, I do not guarantee that it will work properly if you don't set RST_N pin and INT_N pin.