Go Down

Topic: How i upload web page from sd card of ethernet shield w5100 for control leds? (Read 2 times) previous topic - next topic

PaulS

You can't serve a dynamic page from static storage. You can serve the static parts of the page from the SD card, but the dynamic stuff must be served dynamically.

power7net

ok i make the code...but display the value at the buttom of page....
Code: [Select]

if (c == '\n' && currentLineIsBlank ) {
           delay(300);
           xClicksProcessed++;
           
           
           client.println("HTTP/1.1 200 OK");//8
            client.println("Content-Type: text/html");//9
            client.println();//10

             myFile = SD.open("index.htm");
  if (myFile) {
    Serial.println("index.htm:");
   
    // read from the file until there's nothing else in it:
    while (myFile.available()) {
    client.write(myFile.read());
    }
    // close the file:
    myFile.close();
  } else {
  // if the file didn't open, print an error:
    Serial.println("error opening index.htm");
  }

            client.print("<br>Analog input A3 (Temperature) reads: <b>");//Temperature sensor Lm35
            client.print(analogRead(3)*0.488);
            client.println("</b>");

            client.print("<p>Clicks since server booted: ");
            client.print(xClicksProcessed);
            client.println("</p>");
Web / sms / bluetooth / arduino / android remote control. Home Automation projects.
http://www.power7.net

power7net

I have many functions for control a/c (pulse Ir) and aruino flash memory 30k is not enough...could i use the sd card for upload code?
Web / sms / bluetooth / arduino / android remote control. Home Automation projects.
http://www.power7.net

PaulS

Quote
I have many functions for control a/c (pulse Ir) and aruino flash memory 30k is not enough...could i use the sd card for upload code?

No.

Go Up