Reading a .HTML file from SD card

Hi guys,

i am trying to build a home automation system and i decided to “host” the webpage on the arduino so i have created an html file (index.html) and inserted it onto the SD card. From the serial monitor i can see that there is an error in opening file.

attached find the code for your info

trail1_html.ino (1023 Bytes)

I always load files on the SD card using a pc to prevent possible errors.

zoomkat: I always load files on the SD card using a pc to prevent possible errors.

Thats what i did, my problem is that my code can read a text and display the contents, but its not doing the same when i try using an .html file

In the below discussion I posted a project with the files that download from the SD card. You might check this and see if it will work for you.

http://forum.arduino.cc/index.php?topic=279849.msg1970392#msg1970392

Filenames on the SD card must usually be in 8.3 format so .html won't be recognized. Use .htm (and make sure there aren't more than 8 characters in the name)

Pete