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

New device unPhone using HX8357D LCD and XPT2046 touchscreen #3544

Merged
merged 2 commits into from
Apr 4, 2024

Conversation

garethhcoleman
Copy link
Contributor

@garethhcoleman garethhcoleman commented Apr 3, 2024

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!

Copy link
Member

@caveman99 caveman99 left a comment

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
Copy link
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
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
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
69 checks passed
@garethhcoleman garethhcoleman deleted the unphone branch April 4, 2024 15:36
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