Skip to content
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

Adapt to the new BOX-3 #29

Closed
LHYhorion opened this issue Sep 26, 2023 · 10 comments · Fixed by #34
Closed

Adapt to the new BOX-3 #29

LHYhorion opened this issue Sep 26, 2023 · 10 comments · Fixed by #34
Labels
enhancement New feature or request esp32-s3-box-3

Comments

@LHYhorion
Copy link

Is your feature request related to a problem?

The new BOX-3 has replaced its screen and uses the gt911 driver. In the current open-source project, the tt21100 driver is used, so the touchscreen cannot be driven.

Describe the solution you'd like.

Can you provide a solution that supports the gt911? So that I can initialize the touchscreen properly.

Describe alternatives you've considered.

No response

Additional context.

No response

@finger563
Copy link
Contributor

Hi @LHYhorion I don't have a BOX-3 for testing, but I do have a LILYGO T-Deck which also has a GT911 touchscreen driver. I'm currently working on a barebones implementation for that driver over on esp-cpp/wireless-debug-display#2. When I get it working there it should then not bee too much trouble to port here, but I won't be able to test it on a BOX-3 in case any other hardware or pin assignments have changed.

@LHYhorion
Copy link
Author

The currently available BOX-3 still uses the TT21100 driver, while the upcoming BOX-3 will use the GT911 driver. I have already adapted the pins for the currently available BOX-3 (you can refer to the BOX-3 BSP, with only two pins modified). If possible, you can port the GT911 driver to this project, and I can test the modifications.

@finger563
Copy link
Contributor

The currently available BOX-3 still uses the TT21100 driver, while the upcoming BOX-3 will use the GT911 driver. I have already adapted the pins for the currently available BOX-3 (you can refer to the BOX-3 BSP, with only two pins modified). If possible, you can port the GT911 driver to this project, and I can test the modifications.

@LHYhorion I've gotten the gt911 driver working on that other repo, so next week when I've got some time, I'll add it on a branch of this repo and you can test it. You're welcome to make your own branch and a PR for it if you want to try before I can get around to it :)

@LHYhorion
Copy link
Author

OK, no problem.

@finger563 finger563 mentioned this issue Nov 5, 2023
12 tasks
@LHYhorion
Copy link
Author

Hi, perhaps you already have ESP-BOX-3, and you've made some hardware modifications to it. I've also made some adaptations to your project to accommodate these changes. However, because the modifications were substantial, I didn't submit a pull request. Here, I'd like to offer a suggestion. Maybe you could consider using Espressif's official drivers (Espressif has provided a proprietary BSP for BOX). This way, you can achieve compatibility across the entire BOX series and reduce maintenance costs.

@finger563
Copy link
Contributor

Hi @LHYhorion I actually just received it on Monday so I'm starting work on it. I've actually started testing the new components and such over on another project (https://github.com/esp-cpp/wireless-debug-display). I've found a couple of differences (e.g. the change to the backlight pin) and am working through them but I'd rather use the components I already have and make / update anything on my own rather than using the provided BSPs. The main reason is because I enjoy writing code :) but also If in the future I want to make my own versions of these devices I'll already have a base of code to build on. From what I can tell, it won't be too bad to make it support multiple devices (the wireless debug display project has a better architecture for how i support 4 devices), so I think I can continue down this route.

Out of curiosity - can you tell me the significant modifications you needed to make? Judging by the schematics and the Box 3's BSP, there shouldn't be too many changes required - though for some reason I've not had luck using the config in the Box 3's BSP (e.g. the screen doesn't respond as either an Ili9341 or a ST7789 display, and the I2C bus does not show either the TT21100 or the GT911 on the bus).

@LHYhorion
Copy link
Author

Hi @LHYhorion I actually just received it on Monday so I'm starting work on it. I've actually started testing the new components and such over on another project (https://github.com/esp-cpp/wireless-debug-display). I've found a couple of differences (e.g. the change to the backlight pin) and am working through them but I'd rather use the components I already have and make / update anything on my own rather than using the provided BSPs. The main reason is because I enjoy writing code :) but also If in the future I want to make my own versions of these devices I'll already have a base of code to build on. From what I can tell, it won't be too bad to make it support multiple devices (the wireless debug display project has a better architecture for how i support 4 devices), so I think I can continue down this route.

Out of curiosity - can you tell me the significant modifications you needed to make? Judging by the schematics and the Box 3's BSP, there shouldn't be too many changes required - though for some reason I've not had luck using the config in the Box 3's BSP (e.g. the screen doesn't respond as either an Ili9341 or a ST7789 display, and the I2C bus does not show either the TT21100 or the GT911 on the bus).

You're right, the BOX-3 only had three modified pins compared to the BOX, but there was actually a beta version of the BOX-3 before its release that used the TT21100. I chose to use the official BSP of Espressif (as I am more comfortable with their official drivers) to be compatible with the full range of BOX products, which would disrupt your original code structure. I also made some adjustments to some features, so I didn't submit a PR. Your project is excellent, thank you for your contributions.

@finger563
Copy link
Contributor

@LHYhorion Ah I see - and that makes complete sense. I did figure out the issue I was having with my Box-3 (turns out the LCD/Touch reset pin polarity changed between BOX and BOX-3) and now that I've figured that out I have it working in the other project. When I get some time this weekend I'll start getting this project working on the BOX-3. It'll take some time to get new circuit designs made and tested, but I should be able to get the code working and tested quickly.

@LHYhorion
Copy link
Author

@LHYhorion Ah I see - and that makes complete sense. I did figure out the issue I was having with my Box-3 (turns out the LCD/Touch reset pin polarity changed between BOX and BOX-3) and now that I've figured that out I have it working in the other project. When I get some time this weekend I'll start getting this project working on the BOX-3. It'll take some time to get new circuit designs made and tested, but I should be able to get the code working and tested quickly.

That's correct, the polarity of the LCD reset pin has been changed, and two pins have been swapped. You can refer to the official BSP for BOX-3 for the specific changes, or feel free to reach out to me anytime for more information.

@finger563
Copy link
Contributor

@LHYhorion Thanks, i've been just following the info here: https://github.com/espressif/esp-bsp/blob/master/bsp/esp-box-3/include/bsp/esp-box-3.h and hopefully soon I'll have a PR with support for the Box-3 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request esp32-s3-box-3
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants