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

Help optimizing for 128x160 #1

Open
skyblaster opened this issue Jan 5, 2024 · 5 comments
Open

Help optimizing for 128x160 #1

skyblaster opened this issue Jan 5, 2024 · 5 comments

Comments

@skyblaster
Copy link

skyblaster commented Jan 5, 2024

I bought an inexpensive 1.8" TFT LCD not realizing it had a worse pixel density than the T-Display.

I used a custom User_Setup.h file with the latest TFT_eSPI library.
Most important variables listed below:

#define USER_SETUP_INFO "User_Setup"
#define ST7735_DRIVER
#define TFT_RGB_ORDER TFT_RGB
#define TFT_WIDTH  128
#define TFT_HEIGHT 160
#define ST7735_ROBOTLCD

I also made the obvious following change in the .ino file:

int tft_width = 128;
int tft_height = 160;

It's functional as-is, so not a big deal that some text wrapping has occurred, but any quick hints on optimizing for this size?

EDIT: Adding the link to what helped me get it going:
https://www.devacron.com/2022/06/27/add-an-st7735-tft-display-to-an-esp32/

Thanks!

PXL_20240105_015316683

PXL_20240105_015406058

PXL_20240105_015537132

@ModLogNet
Copy link
Owner

Hi Skyblaster,
Unfortunately I didn't factor in different screen sizes when I wrote it. You could try to change the text size. But from a quick search pushImage doesn't support scaling so you'd have to export then resize the icons and import them again. After that, you'd have to manually position them on the screen. It's not impossible, but it'll be time consuming.

@skyblaster
Copy link
Author

Unfortunately I didn't factor in different screen sizes when I wrote it.

You did to some degree, otherwise there wouldn't be this 😄
if (tft_width >= 240) {

Thanks. I think there might be smaller fonts to choose from, but during my testing, things only ever got bigger.
I'm quite happy with the way it is currently, but would you consider keeping the "Issue" open for others to see and chime in on?
I would suggest moving it to discussions, but I don't see the option, and no-one really looks there unless it's a big project.

@ModLogNet
Copy link
Owner

ModLogNet commented Jan 5, 2024

things only ever got bigger.

Perhaps try a font that offers smaller characters? if it is possible it might get to the point where the text becomes illegible.
I don't mind if the "issue" is kept open, if anyone wants to add their info to help, by all means, they are welcome :-)

@skyblaster
Copy link
Author

I just noticed that you used this LCD along with the larger ENC28J60 in your second iteration of this project.
Do you happen to have any enclosure STL's to share? Thanks!

@ModLogNet
Copy link
Owner

Here's a few variations https://modlog.net/wp-content/uploads/2024/02/Body_Final.zip It's designed to fit an arduino hot glued behind the screen and a separate bluetooth board. Enjoy :-)

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

No branches or pull requests

2 participants