Maximum size of a wifly sketch????

I have bought one of the wifly shields and am having some issues with file size. I am wondering is there a maximum file size allowed to be sent to the wifly shield. I am guessing there is due to the fact that I can only load so much HTML code to the shield before it quits working? Through much trial and error, loading the code line by line till failure, I am at 5kb of HTML code when it quits functioning. And when I say quit funcitoning I mean the flashing green status light quits flashing altogether and goes solid. If I put the full table I have written in the sketch (a 10k sketch in size) the wifly shield wont ever recognize it, it does not go through the reload process after uploading the sketch.

This is not the total sketch size either, just the size of the html code I am sending the wifly, at 5k it works and any over that it doesnt. I am trying to run a table with 8 columns with 8 pushbuttons per column.

Any one else experienced the same thing?

All the array and constants (as presumably your HTML data is) goes in SRAM. Since there is a limited amount of SRAM, you are most likely running out of memory. Look at the PROGMEM directive, which puts constant strings in program memory, instead of SRAM.

Only constant strings and read-only data can go in PROGMEM.

Thanks Paul, I am using a mega 2560, and the total sketch size is around 30,000 bytes. the total code that I send to the wifly is only 5000Bytes. This is all the code that is in the client.println("…"); . I tried storing that in a void() and then calling it only when needed, but that still didnt work, I think 5k might be the limit of the wifly

You will likely need to use PROGMEM - That is where I had to store my pages when using the wifly. I used a library to make it easy

Hope that helps..

Thanks Nadeaup,
So would it work something like this?

    // 1////////////////////////////////////////////////  origianl html code in the void loop();
          client.println("<h1>L control</h1>");
          client.println("<form method=get name=L><input type=checkbox name=L value=1>LED
<input type=submit value=submit></form>");
          client.println("<form method=get name=L><input type=checkbox name=L value=2>LED
<input type=submit value=submit></form>");
         //2 ///////////////// declare this before the loop
          FLASH_STRING(htmltext,  "<h1>L control</h1>"
                            "<form method=get name=L><input type=checkbox name=L value=1>LED
<input type=submit value=submit></form>"
                            "<form method=get name=L><input type=checkbox name=L value=2>LED
<input type=submit value=submit></form>"
           // 3///////////replace the code it section 1 with this?
                htmltext.print(what goes in here?);

Do you have a short little example file or something you could send me for help? Also for the final version of my project I will be switch from a wifly to an ethernet shield most likely due to cost, and Im wondering if I will have the same issues with the ethernet shield as i’m having with the wifly

Well I just looked at the library and saw the example sketch, it pretty much answered all my questions. I will give it a try later today.

thanks again!!!