Skip to content

Add support for LilyGo T-HMI board and initialize display and battery…#90

Open
Revers-BR wants to merge 4 commits intoMicroPythonOS:mainfrom
Revers-BR:lilygo_t_hmi_s3
Open

Add support for LilyGo T-HMI board and initialize display and battery…#90
Revers-BR wants to merge 4 commits intoMicroPythonOS:mainfrom
Revers-BR:lilygo_t_hmi_s3

Conversation

@Revers-BR
Copy link

IMG_20260324_202243

IMG_20260324_202228

@ThomasFarstrike
Copy link
Contributor

Wow, very cool, awesome job in figuring this out! It was probably a struggle - props to you!

I added a few questions/comments, let's take it from there!

Copy link
Author

@Revers-BR Revers-BR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the feedback — I’ve updated the PR accordingly.

In the latest commits I:

  • aligned the board with the unified build approach
  • removed redundant config/default restatements
  • replaced the previous T-HMI detection fallback with a hardware-based XPT2046 probe heuristic

This should be much closer to the existing board support style now. Happy to refine further if needed.

@ThomasFarstrike
Copy link
Contributor

Oh waw, that's amazing how you managed to do this! Especially the board detect! I'm impressed!

Now your answer begs the question we gotta ask @jedie - could this be done for the unPhone too? That would be great news! It uses the same touch chip! As for practical implementation, if @jedie would like to see this pull request merged first to avoid conflicts, we can do that, no problem. But it's exciting!

@jedie
Copy link
Contributor

jedie commented Mar 26, 2026

Hm. But the detect_lilygo_t_hmi() function detect if there is a XPT2046 present at the specific pins. But not more, isn't it?
So its a XPT2046 detection, but not board specific.
I will test it on the unPhone.

@ThomasFarstrike
Copy link
Contributor

So its a XPT2046 detection, but not board specific.

That's right.

I don't know if the unPhone has the XPT2046 on the same pins. Hopefully not, because that would mean we have a way to distinguish between the unPhone and the T-HMI.

If they're on the same pins, then at least it narrows it down to those 2 devices, and then we can probably check if one of the GPIO pins being pulled high or low (like we do for the T-Display-S3) to break the tie.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants