-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TRGBArduinosupport lib does not work properly #43
Comments
Because the CST820 enters sleep mode, the CST820 will not respond from I2C until the touch starts. |
Hello Lewis, with CST820 the touch is signaled, but is not properly handled by TRGBArduinosupport, this error msg is raised with every touch: Connecte[ 15731][E][Wire.cpp:513] requestFrom(): i2cRead returned Error -1 |
You shouldn't get errors when touching. Can touch be used normally except for reporting errors? |
No, CST820 and GT911 the touch function is faulty and does not work, touch is not recognized by the software using TRGBArduinosupport.. But only CST820 generates the mentioned error msg in the serial monitor. Because this lib is a re-mixed excerpt from your "factory" example I hope you might have more clue about this issue. |
TRGBArduinoSupport is written by fablabnbg. He has stated in the README that he only uses FT3267 and does not support other models. If you need to use other models. If you use other two types of touch, please use the examples provided by this warehouse, or modify TRGBArduinoSupport. |
He has updated the lib in 09/2023, please read |
T-RGB was maintained by @mmMicky in the early days. It is really not good for novices. I have been integrating the LilyGo display series recently and TRGB is also planned. Please give me some time and I will reorganize T-RGB. |
Hello Lewis, T-RGB is a really good product, and is very useful for my project for which I am planning to sell a few hundred items if I can proceed with it. I already have on project ready with 2.1" halfcircle, but its screen shape is too weird and it is to complicated to mount, because it needs a wide bezel to fasten which looks ugly. I therefore definitely need 2.1" fullcircle & 2.8", but as long as I cannot use the TRGBArduinosupport with it, both my projects are halted.I do not know what you mean with "I will reorganize T-RGB.", my only need is to get TRGBArduinosupport working with these two board versions. |
I understand, what I mean is to integrate the drivers together, and there is no need to distinguish the driver model. I have already implemented many cases, and TRGB is not difficult. Please give me a few days. |
Yes, this was already announced for being done by Ian Hubberts when creating the 2nd version (09/2023) of TRGBArduinosupport as already mentioned by me, and if you can get this lib working with the two other board and touch controller versions the sun will shine for me again. The lib eases the pain to work manually with LVGL by using Squarlinestudio, so it might be very important for future buyers of your T-RGB boards. My hardware specific programming knowledge is very limited, as my last programming experience is 25 years old, and with 70 years, as I am now, I do not want to learn new skills. |
@ThomasSlowhand |
I will register the platformio and arduino libraries for T-RGB soon. Then you can install it directly from pio or arduino. Please use it manually now.
|
Hello Lewis,
many thanks for your message, these are very good news. I will check it immediately.
Mit freundlichen Grüßen,
best regards
Thomas
|
Many thanks again, Lewis, I will keep you posted about my efforts. Do the env switches in platformio.ini and the defines regarding the used version of the boards have all to be removed?
Mit freundlichen Grüßen,
best regards
Thomas
|
Below is my demo platformio.ini. You can develop directly in the root directory of LilyGo-T-RGB, or you can integrate LilyGo-T-RGB into your project.
|
Now LilyGo-T-RGB has been registered in platformio, you can also use pio management to do it
|
Hello Lewis,
your new library is functional, after checking your files I have inserted the needed lines to inherit the class and to invoke it into my code, both round T-RGB 2.1 and 2.8 have touch functionality now – many thanks. I owe you a beer.
Mit freundlichen Grüßen,
best regards
Thomas
|
cheers🍻 |
@ThomasSlowhand Please note that due to changes in platformio, LilyGo-T-RGB was registered under my name and has now been changed to xinyuan-lilygo/LilyGo-T-RGB. Please remember to change the dependency to
|
Many thanks, Lewis, but do you have any clue, while serial debug is not working, even if -DBOARD_HAS_PSRAM is set correctly? |
You can add while(!Serial); after Serial.begin(115200);
|
I just have checked the delay to open the serial port, it do not work.
It seems to be, that the code is remaining in the endless loop
while(!Serial);
and the serial port is not opened.
What I have encountered:
If I press the reset button and open the serial port in the serial monitor by clicking “Start monitoring” shortly after release of the reset button, the serial output comes. But it does not come anymore by resetting the dive again by rest button, and it there is no error message in the serial monitor, that the serial port has been closed due to reset of the device.
What I am encountering, too: Serial output is very slow, when it happens to enable the serial output due to reset and monitoring start in the mentioned sequence.
|
I noticed ARDUINO_USB_MODE=1 , please set ARDUINO_USB_MODE to 0 , or remove it, if set to 1 then serial messages will be output from GPIO43,44 by default |
Setting ARDUINO_USB_MODE=0 causes warnings for each complied file: : warning: "ARDUINO_USB_MODE" redefined Removing ARDUINO_USB_MODE=1 resolves these warnings, but does not heal the fault. But I think, it is some sort of timing problem: If I press "RESET" on the device only shortly, the serial monitor does not recognize the disconnection of the device and stays connected. No serial output. But if I press RESET longer than 2-3 seconds, the serial monitor recognizes the disconnection of the device and reconnects, and serial output is running. |
T-RGB uses USBC, that is, USB-CDC simulates serial and then outputs messages. When RESET is pressed, the device will not be able to run. At this time, the USB device will be invalid, so the serial monitor cannot recognize it. |
No, it only works when the RESET button is pressed long. No hardware failure, I've tried this with two different devices (2.1 full circle and 2.8"), same behavior on both devices. Cross-checked with another project and ESP32 with IL9341 display, this acts normal with the serial monitor. |
A short press on reset does not make the USB device invalid for the serial monitor. And, as already mentioned, I think the serial monitor output is much slower than normal. |
I'm not sure if my understanding is correct, can you record a video for me to check if it is correct? |
When I press "Reset" only shortly, the serial is not disconnected from the device. Only if I press "Reset" longer than 3-5 seconds, than the serial monitor detects a connection loss. |
I uploaded a video so you can see if your T-RGB behavior matches mine |
Hello Lewis, many thanks for your engagement, it is truly appreciated. Despite your video more looks like the necessary driver installation for a SIM-7000, my T-RGB act like described: A short press on "RESET" does not make the PIO serial monitor disconnect from the COM-port, it stays connected. Only by a long press (4-5 sec) on "RESET" the serial monitor detects a communication loss to the com-port and reconnects, after reconnection debug information by "serial.print" is displayed. When stopping serial monitor output by clicking "stop Monitoring" the screen of the device is shut off and gets dark. |
Sorry, the link is wrong, this is |
I noticed you said platformio monitor's window, this is inaccurate, you should be monitoring the computer device manager |
This is the Serial monitoring software used in my video |
I rarely use platformio Serial monitor, but I just tested it and I have the same problem as you. This is a problem with the platformio monitor. After you press Rst, make sure you click on the Serial monitor and press Enter on the keyboard. platformio It can detect Serial disconnection immediately. If you don't press Enter, it will not be detected. |
My device manager acts the same as yours. Immediate disconnection detected. |
I use this and it works fine: ![]() |
What are you using? Arduino IDE? Many thanks for the hint, I will check it. |
So that's normal. |
I cannot use that, because the UI is in Chinese... |
You recommended:
TRGBArduinosupport works fine with FT3267 board, but with CST820 board the touch-function raises a fault in PIO serial monitor:
Connecte[ 15731][E][Wire.cpp:513] requestFrom(): i2cRead returned Error -1
[ 15761][E][Wire.cpp:513] requestFrom(): i2cRead returned Error -1
[ 15791][E][Wire.cpp:513] requestFrom(): i2cRead returned Error -1
With GT911 boards the touch-function does not work at all.
The text was updated successfully, but these errors were encountered: