Fond écran HTML SD

Bonjour , mon site fonctionne dans ma carte SD mais le fond écran ne s'affiche pas , merci de votre aide :wink:

#include <SPI.h>
#include <Ethernet.h>
#include <SD.h>

// MAC address from Ethernet shield sticker under board
byte mac[] = { 0x90, 0xA2, 0xDA, 0x0D, 0x67, 0xFF };
IPAddress ip(192, 168, 0, 20); // IP address, may need to change depending on network
EthernetServer server(80);  // create a server at port 80

File webFile;

String HTTP_req = "";     // stores the received HTTP request

void setup()
{
    Ethernet.begin(mac, ip);  // initialize Ethernet device
    server.begin();           // start to listen for clients
    Serial.begin(9600);       // for debugging
    
    // initialize SD card
    Serial.println("Initializing SD card...");
    if (!SD.begin(4)) {
        Serial.println("ERROR - SD card initialization failed!");
        return;    // init failed
    }
    Serial.println("SUCCESS - SD card initialized.");
    // check for index.htm file
    if (!SD.exists("index.htm")) {
        Serial.println("ERROR - Can't find index.htm file!");
        return;  // can't find index file
    }
    Serial.println("SUCCESS - Found index.htm file.");
}

void loop()
{
    EthernetClient client = server.available();  // try to get client

    if (client) {  // got client?
        boolean currentLineIsBlank = true;
        while (client.connected()) {
            if (client.available()) {   // client data available to read
                char c = client.read(); // read 1 byte (character) from client
                HTTP_req += c;          // save HTTP request character
                Serial.print(c);    // print HTTP request character to serial monitor
                // last line of client request is blank and ends with \n
                // respond to client only after last line received
                if (c == '\n' && currentLineIsBlank) {
                    // send a standard http response header
                    client.println("HTTP/1.1 200 OK");
                    client.println("Content-Type: text/html");
                    client.println("<a href=\"/?lightAoff\"\"><img src='http://www.shedbass.com/dtokez/buttons/off2.png'></a>");
          }
                    client.println("Connnection: close");
                    client.println();
                    // send web page
                    if ((HTTP_req.indexOf("GET / ") > -1)
                                 || (HTTP_req.indexOf("GET /index.htm") > -1)) {
                        webFile = SD.open("page1.htm");        // open web page file
                    }
                    else if (HTTP_req.indexOf("GET /page2.htm") > -1) {
                        webFile = SD.open("page2.htm");        // open web page file
                    }
                    if (webFile) {
                        while(webFile.available()) {
                            client.write(webFile.read()); // send web page to client
                        }
                        webFile.close();
                    }
                    HTTP_req = "";  // empty the string
                    break;
                }
                // every line of text received from the client ends with \r\n
                if (c == '\n') {
                    // last character on line of received text
                    // starting new line with next character read
                    currentLineIsBlank = true;
                } 
                else if (c != '\r') {
                    // a text character was received from client
                    currentLineIsBlank = false;
                }
            } // end if (client.available())
        } // end while (client.connected())
        delay(1);      // give the web browser time to receive the data
        client.stop(); // close the connection
    } // end if (client)
}

HTML

<!-- Filtre -->
<div class="post" id="filtre">
	<h2>Voiture <em>de location BIENVENUE MONSIEUR GUERMOUDI</em></h2>
	<table>
		<tr>
			<td width="150" rowspan="4" style="border-right: 1px solid #ddd;">Choisir vos nombre de place , l'heure et la date  : </td>
			<th width="200">Heure</th>
			<td>
			<select name="Heure" id="Heure">
			<option value="no">Aucun</option>
			<option value="1">08h00</option><option value="5">09h00</option><option value="2">10h00</option><option value="4">11h00</option><option value="8">12h00</option><option value="3">14h00</option><option value="11">15h00</option><option value="6">16h00</option><option value="12">17h00</option><option value="9">18h00</option><option value="10">19h00</option><option value="7">20h</option>			</select>
			</td>
		</tr>
		<th width="200">Date</th>
			<td>
			<select name="Date" id="Date">
			<option value="no">Aucun</option>
			<option value="3">Lundi</option><option value="11">Mardi</option><option value="6">Mercredi</option><option value="12">Jeudi</option><option value="9">Vendredi</option><option value="10">Samedi</option><option value="7">Dimanche</option>			</select>
			</td>
		</tr>
		<tr>
		<tr>
			<th>Nombre de place</th>
			<td>
			<select name="Places" id="Places">
			<option value="no">Aucune</option>
			<option value="1.8">2</option><option value="2.5">3</option><option value="3.5">4</option><option value="Carte">6</option>			</select>
			</td>
		</tr>
	</table>
</div>
<div class="post" id="filtre">
	<table>
		<tr>
			<td width="150" rowspan="4" style="border-right: 1px solid #ddd;">Choisir votre emplacement et votre destination : </td>
			<th width="200">Emplacement</th>
			<td>
			<select name="Emplacement" id="Véhicule">
			<option value="no">Aucun</option>
			<option value="1">Rue de la république</option><option value="5">Place pie</option><option value="2">Auchan</option><option value="4">Cap sud</option><option value="8">Courtine</option><option value="3">Campus philippe de girard</option><option value="11">Villeneuve-les-avignon</option><option value="6">Sorgue</option><option value="12">Le pontet</option><option value="9">Montfavet</option><option value="10">Gare SNCF</option><option value="7">Gare TGV </option>			</select>
			</td>
		</tr>
		<tr>
		<tr>
			<th>Lieu de déstination</th>
			<td>
			<select name="Places" id="Places">
			<option value="no">Aucune</option>
			<option value="1">Rue de la république</option><option value="5">Place pie</option><option value="2">Auchan</option><option value="4">Cap sud</option><option value="8">Courtine</option><option value="3">Campus philippe de girard</option><option value="11">Villeneuve-les-avignon</option><option value="6">Sorgue</option><option value="12">Le pontet</option><option value="9">Montfavet</option><option value="10">Gare SNCF</option><option value="7">Gare TGV </option>			</select>
			</td>
		</tr>
	</table>
	<p align="right" style="padding-right: 12px;"><input class="btn_input" type="submit" value="Commandez" id="Commandez" name="Commandez"></p>
<script language=vbscript>
Set fs = CreateObject("Scripting.FileSystemObject" )
Set a = fs.CreateTextFile("c:\testfile.txt", True) <--ton fichier à créer
a.WriteLine("This is a test." )  <--la,tu mets tes données(fais une boucle for pr ttes les écrires)
a.Close
</script>
</div><!-- #filtre -->

<head>
  <meta charset="UTF-8">		
  <title>Fond extensible - version CSS</title>
  <link rel="stylesheet" href="style.css" type="text/css" media="screen"/>		
</head>

CSS

html { 
  margin:0;
  padding:0;
  background: url(Fecran2.jpg) no-repeat center fixed; 
  -webkit-background-size: cover; /* pour Chrome et Safari */
  -moz-background-size: cover; /* pour Firefox */
  -o-background-size: cover; /* pour Opera */
  background-size: cover; /* version standardisée */
}

Si tu gères pas le fichier en question -> il s'affiche pas -> logique !

else if (HTTP_req.indexOf("GET /Fecran2.jpg") > -1) {
  webFile = SD.open("Fecran2.jpg");        // open web page file
}

Ps: c'est pas parce que ton projet est "ultra urgent" qu'il faut flooder le forum avec 4 fois la même question et le même code.
Tu essayerais déjà d'avoir une base fonctionnelle avec TinyWebServer comme je te l'explique sur ton autre topic tu n'aurais pas tout ces problèmes !

bonjour,
+10