New device unPhone using HX8357D LCD and XPT2046 touchscreen - #3544
Merged
Conversation
caveman99
approved these changes
Apr 4, 2024
caveman99
left a comment
Member
There was a problem hiding this comment.
Looks straightforward to me
caveman99
reviewed
Apr 4, 2024
|
|
||
| // #define BATTERY_PIN 13 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage | ||
| // #define ADC_CHANNEL ADC2_GPIO13_CHANNEL | ||
| // #define BAT_MEASURE_ADC_UNIT 2 No newline at end of file |
Member
There was a problem hiding this comment.
Just for curiousity - is there a way to measure battery capacity?
Contributor
Author
There was a problem hiding this comment.
Yes, VBAT is wired into the battery sensing pin of the XPT2046 touchscreen chip (secret feature, often not implemented in libraries). I have an issue on my list to get it working here. If I'm lucky the LovyanGFX has implemented it, if not, I might have to put in a PR there....
Member
There was a problem hiding this comment.
Ok, just taking a mental note this is probably still coming :-)
jeek
pushed a commit
to jeek/Meshtastic-Exploiteers-Hacker-Pager
that referenced
this pull request
Jun 30, 2026
New device unPhone using HX8357D LCD and XPT2046 touchscreen
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The unPhone (device shop) has a phone form factor, 480x320 touchscreen, battery, accelerometer, RGB and IR leds and a vibration motor for haptic feedback.
These changes are to implement support for HX8357D driven screens and XPT2046 touchscreens (WIP) (both using LovyanGFX library on SPI) as used on the unphone.
I hope I have done everything correctly to allow you to easily review these changes. Just let me know if I've missed anything or misunderstood, thanks!