Hi All. I am relatively new to this platform but have managed to make a few basic sketches work in the past, mainly from following patterns and code this great forum provided.
I am using a clone Arduino Mega2560 with MCUFriend 3.5" TFT, and when I run an example from UTFT library with a slight change to the driver, it all works well.
However, I have been searching for several days now, on exactly how to use Sprites with my setup to display an image that I have converted to .h file via Rinky-Dink Electronics . I am sure this must be possible, but I have failed to understand how to bring in the Sprite functionality to my working setup using UTFT so far.
Appreciate any assistance to point me in the right directlion to understand how to achieve this.
I'm not sure about the meaning of "sprites" in your text but according to Wikipedia it's:
In computer graphics, a sprite is a two-dimensionalbitmap that is integrated into a larger scene, most often in a 2D video game. Originally, the term sprite referred to fixed-sized objects composited together, by hardware, with a background
Converting images to .h file is not the best way to work with images in this type of TFT because it can take so much space in the FLASH memory.
The best way is convert the images to raw file and save on SD card.
There's a program inside UTFT library folder to do such convertion.
To load the image on code use the library UTFT sdRaw. Here an example:
My use case is one where I would need to display very large characters such as "F1" (forward in 1st gear) or "R1" (reverse in 1st gear) on a screen in the middle of my truck dashboard, with those characters indicating what gear the offroad truck is in. It has 8 gears in both forward and reverse, as well as Neutral. That works out to 17 different combinations, and I did try scaling fonts as a solution but it appears as very "blocky" at that size.
I then considered displaying images of each combination, but loading images directly off the sdcard may be slow, and may not be matching the speed of changing gears on the truck. I watched some Youtube videos that showed using Sprites makes loading images onto screens much quicker.
I am not saying this is the final solution, but just wanted to see for myself if this is achievable. I am also aware that memory would be an issue with Sprites, but nontheless would like to try this out.
Unfortunately with the Sprite examples (using TFT_eSPI library), I could not figure out how to make it work with my Mega and 3.5" TFT screen.