ModLogNet / ESP_ENC_CDP

This is written for ESP32's and supports CDP, LLDP, and DHCP using an ENC28J60
https://modlog.net/esp32-cdp-lldp-dhcp-third-edition/
5 stars 5 forks source link

Help optimizing for 128x160 #1

Open skyblaster opened 11 months ago

skyblaster commented 11 months ago

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 commented 11 months ago

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 commented 11 months ago

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

You did to some degree, otherwise there wouldn't be this :smile: 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 commented 11 months ago

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 commented 9 months ago

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 commented 9 months ago

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 :-)