Problems drawing a bitmap with UTFT drawBitmap

I have this LCD in 7' (800 x 480): http://www.electrodragon.com/product/tft01-lcd-tft-display-3-2-65kcolors-320240-resolution-touch-panel-sd-slot/

I am fully new on it, I try to "see" in my LCD a picture so I have converted it with the utility that cames with the UTFT library, I mean imageconverter565.exe

So I get a logo.c (my array) in 800 X 480 (even in smaller sizes.... 200 x 122)

However when I try to upload I get an error:

"logo.c:9: error: size of array 'logo' is too large const unsigned short logo[0x17D40] PROGMEM ={ ^ Exception in thread "AWT-EventQueue-0"......"

I just want to see a picture on the screen, at first at full-resolution (800x480)

Where do I go wrong? Another way? the LCD cames with SDCard.... but no idea about it...

Thank you very much.

What board are you using?

The image is 800x480 pixels x 2 because it is of type short, which is 2 bytes. So in total that equals 750K bytes of memory which no arduino has. You need to use an SD Card and a library compatible with both the SD card library and UTFT library.

Talk to user ghlawrence2000

Hello, I am using Arduino Mega 2560.

I thought about using SD because de LCD has it, and I have read about it. Could be Adafruit ????

I have download, but the example is not a "common .ino" and I don't understand if it suits my board/LCD or not ....

I can¡t see it clearly.

Could be Adafruit ????

Nope, its UTFT compatible. Again talk to user ghlawrence2000, he wrote the library so he can help you better than me.

Pabusa,

First of all, have you got your SD card working? Preferably using SdFat available from here :- https://github.com/greiman/SdFat

Once that is done, you should be able to use the examples supplied with UTFT_SdRaw.

UTFT_SdRaw is now installed through library manager.

Any further questions, feel free to ask.

Regards,

Graham

ghlawrence2000: Pabusa,

First of all, have you got your SD card working? Preferably using SdFat available from here :- https://github.com/greiman/SdFat

Once that is done, you should be able to use the examples supplied with UTFT_SdRaw.

UTFT_SdRaw is now installed through library manager.

Any further questions, feel free to ask.

Regards,

Graham

Hello ghlawrence2000, first of all, thank you very much for your help.

I tell you.... I was reading meanwhile and I saw UTF_tinyFAT and tinyFAT libraries, so I try with it and I can see my picture from the SDCard of my TFT.

It was so easy, just import libraries, copy my raw image to de SD .... and load the example.... (I have to test more to "improve" the results, because it is not exactly I wanted). And I see it.

But, now I have doubts... which differents from the way you told me (SdFat / UTFT_SdRaw) .... ?????

Thanks

If UTFT_tiny_FAT works for you, stick with that. But UTFT_SdRaw is faster and not limited to 2GB SD cards, and can use folders and long filenames.

Regards,

Graham

ghlawrence2000: If UTFT_tiny_FAT works for you, stick with that. But UTFT_SdRaw is faster and not limited to 2GB SD cards, and can use folders and long filenames.

Regards,

Graham

MMmm.... yes as you tell, it is rather slow... and I have another question. The test I told you, just show the image at 800x480 (the resolution of my TFT), two more doubts:

1- it could be interesting for my to see the picture at a lower resolution, I mean, for example to draw buttons in another part of the TFT, it seems only work in full screen although I have to read the example carefully to see if it is possible.

2- The way you told me, with your libraries, is it as simple as the one or there are necesary more steps???? If it is as simple as the first I could try to compare speed.

Thank you very much again.

If you require only 400*240 image, then you can do that......... What exactly are you aiming to achieve?

Regards,

Graham

ghlawrence2000: If you require only 400*240 image, then you can do that......... What exactly are you aiming to achieve?

Regards,

Graham

The aiming was, to show an image (but not full screen), having free space in the screen to draw a button... to be touched and "goes on"....

The example read the "x" resolution and the "y" resolution then only show the image that has this resolution.

I got it, playing with the example.

What about speed with the others libraries?? And much more steps or just importing and "calling"?

Thank you

I don't understand, sorry. Stick with UTFT_tinyFAT if it makes your life easier?

I have no problems with UTFT_SdRaw, and simply detect regions of the image that act as buttons.

Regards,

Graham