Skip to content

New device unPhone using HX8357D LCD and XPT2046 touchscreen - #3544

Merged
caveman99 merged 2 commits into
meshtastic:masterfrom
garethhcoleman:unphone
Apr 4, 2024
Merged

New device unPhone using HX8357D LCD and XPT2046 touchscreen#3544
caveman99 merged 2 commits into
meshtastic:masterfrom
garethhcoleman:unphone

Conversation

@garethhcoleman

@garethhcoleman garethhcoleman commented Apr 3, 2024

Copy link
Copy Markdown
Contributor

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!

@caveman99 caveman99 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks straightforward to me


// #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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Just for curiousity - is there a way to measure battery capacity?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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....

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ok, just taking a mental note this is probably still coming :-)

@caveman99
caveman99 merged commit 9b2d862 into meshtastic:master Apr 4, 2024
@garethhcoleman
garethhcoleman deleted the unphone branch April 4, 2024 15:36
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
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.

2 participants