fablabnbg / TRGBArduinoSupport

Basic support (arduino and platformio) for T-RGB device
12 stars 8 forks source link

Support for the "Round" version (so called "full circle" by LiyGo) with CST820 touch chip #5

Open ThomasSlowhand opened 1 year ago

ThomasSlowhand commented 1 year ago

I am using the by LilyGo T-RGB so called "half circle" version with FT3267 (by you called "oval" version) with your library, and everything works fine. But due to the better mechanical stability and the much easier mounting due to its more simple shape I would like to use the "full circle" (the "round" version) which utilizes the CST 820 instead of FT3267. Do you plan to support this chip, too? Unfortunately I have a lack of knowledge and experience of low level programming to adapt it by myself,

euphi commented 1 year ago

I ordered a full circle version with CST820 some days ago and now wait for delivery.

ThomasSlowhand commented 1 year ago

Hello Ian,

I'll be pleased if you'll keep me posted about your efforts once the round version drops in.

BR, Thomas

euphi commented 1 year ago

I changed to lib to use the TouchLib, so all T-RGB variants are now supported, see 7d47e336f9bb236658f8b0510bc24568eb030d91

A detailed documentation will follow, but basically you need to use:

ThomasSlowhand commented 1 year ago

I changed to lib to use the TouchLib, so all T-RGB variants are now supported, see 7d47e33

A detailed documentation will follow, but basically you need to use:

  • latest version of this lib (https://github.com/fablabnbg/TRGBArduinoSupport.git in platformio.ini)
  • Define the type of T-RGB you are using, e.g. -DTRGB_ROUND in platformio.ini
  • Remove instances of TRGBSupport in your code because the library now instantiates itself (global symbol trgb).

Hello Ian,

I've done as explained by you, and the TRGB round display is working when DTRGB-ROUND is defined in platformio.ini. But the touch screen does not work, errormsg is >> [564616][E][Wire.cpp:513] requestFrom(): i2cRead returned Error -1 <<

Any help is highly appreciated.

Many thanks in advance and best regards, Thomas

ThomasSlowhand commented 1 year ago

PS. I do not know if it makes a difference, but I must use the board option "esp32s3box" to get both the oval and round version running, with "esp32-s3-devkitc-1" both devices are always rebooting in an endless loop.

[env:esp32-s3-trgb] platform = espressif32 board = esp32s3box framework = arduino build_flags = -DARDUINO_USB_MODE=1 -DARDUINO_USB_CDC_ON_BOOT=1 -DBOARD_HAS_PSRAM -DTRGB_ROUND board_build.cpu = esp32s3 board_build.arduino.memory_type = qio_opi board_build.partitions = default_16MB.csv lib_deps = mcxiaoke/ESPDateTime khoih-prog/ESP_WifiManager@^1.12.1 ianh/TRGBArduinoSupport@^0.0.4 otadrive/OTAdrive@^1.1.15 lvgl/lvgl@^8.3.9