Go Down

Topic: Webserver from SD card and picture problem (Read 5 times) previous topic - next topic

sbright33

What 3 places on picture?  What is the other page?  I cannot test it today.
If you fall... I'll be there for you!
-Floor

Skype Brighteyes3333
(262) 696-9619

rokitz

Hello Alda,

i have downloaded your update code and turned it into a wifi shield code. It functions so somewhat with my modifications.

I don t know how do you call pictures from the sd card. Please tell me.

Many Greetings.

Rokitz.
Thank you for all help!

mohamed66

Thanks for your advice ,,, but pictures downloading slowly when i open the webpage do u know why ?

zoomkat


Thanks for your advice ,,, but pictures downloading slowly when i open the webpage do u know why ?


The arduino is slow compared to computer based servers.
Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   8)

pylon

Quote
but pictures downloading slowly when i open the webpage do u know why ?


Additionally to zoomkat's explanation there's another reason:

Code: [Select]
          int16_t c;
          while ((c = file.read()) >= 0) {
              // uncomment the serial to debug (slow!)
              //Serial.print((char)c);
              client.print((char)c);
          }


You're reading the file byte by byte and then hand it over to the Ethernet library using the print() method. This way you create a packet for every byte you want to send. This is highly inefficient. It's a drawback of the Ethernet library but there is a reason for this: the lack of memory in the Arduino forced that decision. If you create a buffer of let's say 256 bytes and read that quarter kB from the card and send it using the write() method you will get faster (but not fast) responses.

Go Up