KrisKasprzak / ILI9341_t3_controls

Graphical slider controls for TFT LCD type displays
30 stars 65 forks source link

Issues changing library for different driver. #7

Closed HuskyDread closed 1 year ago

HuskyDread commented 1 year ago

I'm trying to convert the progrma to use for an Elegoo 2.8" tft touch screen. I see where to change the driver name is the .h drive, bur I'm unsure what to change the font items to. They're still requesting ILI9341, but my new driver doesn't have fonts built in.

KrisKasprzak commented 1 year ago

What display driver are you using?

HuskyDread commented 1 year ago

I'm using someone else's project as a base, but they libraries they have installed are Elegoo_TFTLCD.h and TouchScreen.h. I added Adafruit_GFX and have been trying to switch the fonts over to those instead, but I'm confused on what variables I need.

KrisKasprzak commented 1 year ago

The elegoo library has it's own graphics core library, you will need Elegoo_GFX. I seriously doubt you can use the Adafruit_GFX in it's place.

The Elegoo lib's doesn't seem to support changing a font, it only has setTextSize(n) capability. But the issues are not just fonts.

Hacking my library will take a ton of work. I just did a quick scan to see what's missing in the elegoo stuff. You will need to plan to handle setFont(), getCursor(), getTextBounds(), probably others.

What MCU are you using? Can you share what graphics / UI constructs you are trying to use?

Depending on how fancy you want your project, you may consider using a different graphics lib.

HuskyDread commented 1 year ago

From what I've heard, the Elegoo_GFX and Adafruit_GFX are similar enough that you can interchange them with some small changes, but I'm also pretty new so I'm not sure. I'm using an Elegoo Mega 2560. I was hoping to make a graph of some data for a college project. It would be a fairly simple time over battery percentage graph. I looked at a few other options, but this library had the most details for how to use it so I was gonna try it. If you have any other suggestions, please let me know.

KrisKasprzak commented 1 year ago

I feel you will spend more time editing libraries than it's worth. Maybe switch to these?

Adafruit_9341 library Adafruit_GFX library Adafruit_ILI9341_Controls library (https://github.com/KrisKasprzak/Adafruit_ILI9341_Controls/tree/main)

HuskyDread commented 1 year ago

Thanks! I'll look into those.