View images from SD card on TFT display

Lastly...................

If you do manage to design a nice user interface and feel like sharing it with me, I would be very appreciative, I just have so much on at the moment, some things slid down the list a little you know??

If you are up for a challenge.............

I would especially like a 'QWERTY' touch screen keyboard :wink:

Take care, Regards,

Graham

I can't read your mind, I don't know your sending another message. I'm just quick on the replies to keep the momentum going, I hate when its one post a day, nothing gets done. :slight_smile: No problem on the karma, when sites allow I do give it. I realize a lot of people don't and they should. While browsing this forum to figure this out I've seen a lot of post where you are trying to help people yet you only had 2 karmas?

For the features, maybe I'm missing it but I don't see the benefit? Why would I load a large image just to show a small portion? That would take longer then loading only the small portion I need to see.

Maybe useful for your mapping project but I don't think it will work for me, unless again I'm missing something.

I plan to have about 15-20 different screens, for changing settings, etc... Each screen will have its own icons and they will usually be in different locations on the screen.

Example, when on the home screen you can click icons to go to other screens, and from those screens to more.

Each page will need to load as the data is different so the image would need to reload as well, which again would take longer to load a large image than a few small images, no? Plus I have icons on different pages in the same location so even if I didn't have to reload that one large image everytime a page is clicked the icons would overlap.

I'm trying to build a full blown aquarium controller that will do everything and anything. :slight_smile: I've never touched arduino till a couple weeks ago, already bought 3 of them, lol. Uno, mega2560 and due. Shouldn't have just started with the due as I always like the best, I don't know what I was thinking. I have done vb, java and php so I'm confident I can get this done. Once I get rolling I'll understand it, right now I'm just collecting libraries for what I need to make sure they all work together before I do much coding.

I was actually thinking it would be nice to have a QWERTY keyboard so labeling could be custom but that's a long way away, I have a lot on my plate. When I get to a point that is useful to others I'll definitely share what I've done.

I attached the image I was trying to load it will give you an idea of what I'm doing.

Like your png!! Very pretty!

I was no expert of vb, but hate java, and php thought was a pity could not use as standalone programming language.... I liked php!

I remember BASIC back in the day when it was the primary language on BBC Micro computer!! :wink: Oh slow down you old git, don't go reminiscing too much :stuck_out_tongue:

When I have dealt with the functions I was trying to tell you about..............I will include a demo and then hopefully it will be clear what I was trying to explain?

mmmm sort of yes and no regarding the loading a small portion of what you want to see.....

Let's leave it at that for now...... I will produce a demo when its working as it should.........

Really happy you are up and running now!!!

Regards,

Graham

Thanks, that's just a quick mockup, it'll change quite a bit.

I'm no expert either, just know enough to get by and do what I need to do, php is my favorite as well. I'm not so worried about programming what I need, I'm worried about the electronics section, that scares me, lol. Thankfully this is simple a few pumps, temp controllers, rtc, relays and a couple other things.

That demo sounds good, take your time but would be nice to see.

I'm extremely happy this thing finally works, now I can move on. Thanks again!!

Rob,

How does 4.5s to draw 210 icons each of size 42x42 pixels grab you? That would be a 800x480 screen full of icons......
Seems extreme you would have that many icons, but you asked why would you have a large file to only show small part? This is a good example.......... Hang on, I will feed back the equivalent time to draw 210 individual icons..... Don't hold your breath..... will take me a long time to produce 210 individual icon files..............

Regards,

G

Oh , Hi Rob,
You are on line! :smiley:

I have essentially converted the CTE file icons.jpg into icons.raw..... slight changes along the way...... but my function

myFiles.panBitmap(xd, yd, 42, 42, xad, yad, 2374, 696, fname440);

works well............
Ongoing project................. hopefully can convince you of the benefit of doing it this way.......
Regards,
Graham

Hi Graham, that 210 icons seems a bit much and almost 5s is a long time. I was very happy with the speed I was getting for a full size image. That png loads in less than 500ms and that's with a slow SD card.

Everything has changed now though, I think my due is dead! :o I can't even be blamed for it.

I've been playing with the DueFlashStorage library for storing to flash and now out of the blue it tells me "Flash page is locked". I've tried the erase and reset buttons together but nothing.

Real bummer, don't know what I'm going to do, I can't be buying another board. Maybe I'll just use the mega2560 and be done with it.

:frowning: That doesn't sound good :frowning:
Did you try just press and hold 'erase' for a few seconds..........
Then press reset when ready to upload new sketch?

I don't think you can kill it by the type of sketch you run....................... bad interfacing and burning stuff out I can understand......

The 210 icons was not a sensible proposal................it just happens to be how many 42x42 icons it takes to fill the entire screen :p;)

Hope you can fix DUE, because MEGA will just be a disappointment how slow it is when you played with DUE for a while!!

Regards,

Graham

It's not looking good, I've tried so many things but nothing, even held the erase for a minute. Added power after pressing erase, and every other combo but nothing. Its flashes the tx and rx light quickly because it wants to write to it but then shows the error. I've also tried the native port same thing.

I also can't image a sketch doing this, maybe the cable I have is bad and during upload it lost connection briefly, who knows. There's a thread on here with a couple others who have experienced the same thing, other then that I can't find info about it. Fun while it lasted.

And your right the mega is a disappointment, I fired it up to make sure my screen was ok and its so slowwww. I don't want to buy another due because I expect to ruin one when hooking up electronics, lol.

:frowning: Sorry to hear Rob! :frowning:
Even with bad cable or disconnect during uploading a sketch............ (done it several times due to bad USB connector)..... push the reset button just at the right time when trying to upload a sketch...... it always recovered for me....

Check your Private messages.

Regards,

Graham

THX ghlawrence2000. Great work!.

Hardware: HY32D TFT (without SD card reader)
SD card reader: external reader on TFT ILI9341
Format: BMP 24 bits to RAW
Tool: ImageConverter 565 v2.1 (from UTFT lib)

Multiple image test

Nice!!

Glad you like it.

Regards,

Graham

Hi Rob,

Did you have any luck with your DUE yet. Is there a link to a thread of the library you were trying when it died?

Regards,

Graham

Hi Graham, no pretty sure its toast, it won't respond to anything. I can't remember exactly which library it was but it was an eeprom library to write to flash, just so happens to be the thing that locked up. Probably coincidence though as I it was working at one point.

I'm just going to use the mega for this project, I have 2 of them and it would be crazy not to use them. I did manage to find an optimized version of UTFT and it does load images twice as quick. It's actually not that bad now, still not the due but...

Here's a link if you want to try it on the due.

http://forum.arduino.cc/index.php?topic=140111.30

It was the DueFlashStorage library, post #75

http://forum.arduino.cc/index.php?topic=144446.75

( SOLVED )

Hi all,

when I upload the example sketch to the DUE using the UTFT_tinyFAT with Arduino 1.5.7 and ImageConverter with a test.raw, I get only noise on my 7 inch screen (SSD1963).

The serial monitor says: "Can't access SD card. Do not reformat.
SD errorCode: 0XF,0X0"
The normal SD library -> CardInfo works as well as SdFat->SdInfo (but I have to manually pull the cs pin via MCP23017 down).

All my onboard I/Os are in use, so the chip select signal for the sd card comes from a MCP23017; may this be the issue? Is it set during operations in the library? When I simply pull it low it doesn't work...

I hope someone can help me :slight_smile:

EDIT: SORRY FOR ALL THIS! It works! I don't know why, I just uploaded some sketches several times and suddenly (without any change!) I can now display a 800x480 image in 1021ms. Thanks for this great library!!

Hi Vile,

1021ms? Is that a slow SD card? Because I got it down to about 815ms for 800x480 last time I checked... :wink:

Regards,

G

Hey Graham,

I am trying your library but keep getting this error everytime I try to run the demo:

Arduino: 1.5.8 (Windows 7), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"

C:\Users\Samer\Documents\Arduino\libraries\UTFT_tinyFAT\UTFT_tinyFAT.cpp:19:19: fatal error: SdFat.h: No such file or directory
#include <SdFat.h>

Hi!

Firstly, Happy New Year to everyone.

ghlawrence2000, I'm trying to use your library with an Arduino Mega 2560 and a TFT 400 x 240.

I did some changes in class name to UTFT_SdFat. You can find the library here: http://1drv.ms/1EWZHwL

The example works fine with "iAqua.raw" and "Copy.raw" the time to load is 0.25 seconds while UTFT_tinyFAT is 0.78.

But I can't use the file "test.raw" that have 400 x 240 pixels. The Arduino does reboot every time. The file "test.raw" works fine with UTFT_tinyFAT.

Can you try this code and give me some suggestion to solve the problem?

Best regards.

Happy New year to you too! ;D

Ok, So I downloaded and installed your library and copied the files to my SD, modified the chipselect pin to match my setup and ran your example sketch. It draws your iAqua and Copy files in .19seconds :wink: :stuck_out_tongue:

However........... the ITDB32S display is only 320240..... So you cannot draw a 400240 image.....

Might I suggest you get the latest version of my library and thus refer you to this thread...7in LCD with Mega 2560 and CTE Shield - Displays - Arduino Forum

The thing with the MEGA is that it has limited SRAM available for image buffer, as such, the larger the image you wish to display, the smaller you need to make the buffer. Refer to the link I gave and maybe this will all make more sense :wink: :stuck_out_tongue:

Best wishes,

Graham