[Solved] don't load the code

Hi all I have a code HTML, and I loaded the code on arduino but it's work up to a point. when I'm adding 2 buttons I can't open the page (is shutdown)
but if remove these 2 buttons the page open OK!.

I proved the code piecemeal. I know that the code is OK.

I feel like arduino is in need more space or memory. when I load or compile the code, bottom (in sketch) say "binary Sketch size: 15.138 bytes (with a maximum of 32.256 bytes)". then spare me space? if so then what is the problem? otherwise I'm doing wrong?

if you need more info just call it and I will respond asap.

Hello, yes post all your code (as an attachment to your reply), and which Arduino model do you use?

I feel like arduino is in need more space or memory. when I load or compile the code, bottom (in sketch) say "binary Sketch size: 15.138 bytes (with a maximum of 32.256 bytes)". then spare me space? if so then what is the problem? otherwise I'm doing wrong?

There are three kinds of memory on the Arduino. Flash, where your code goes, SRAM, where variables and literal strings go, and EEPROM, where you can persist data between power cycles.

The compiler is telling you how much Flash memory you have used. Nothing tells you how much SRAM you have used. But, the symptoms you describe say that you have used more than you have.

There are ways to move the literal strings out of SRAM, but, as guix says, we need to see your code.

guix:
Hello, yes post all your code (as an attachment to your reply), and which Arduino model do you use?

I'm using Arduino Uno R3 + Arduino Ethernet Shield, and Sketch | Arduino 1.0.2
this is the code:

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

//Declaración de la direcciones MAC e IP. También del puerto 80
byte mac[] = {0xB4, 0x00, 0x00, 0x00, 0x00, 0x54};
byte ip[] = { 192, 168, 1, 150 };

EthernetServer servidor(3010);

int PIN_LED=8;
String readString=String(30);
String state=String(3);
String codigo="12345";
String creadorHTML="login";

void setup()
{
Ethernet.begin(mac, ip); //Inicializamos con las direcciones asignadas
servidor.begin();
pinMode(PIN_LED,OUTPUT);
digitalWrite(PIN_LED,HIGH);
state="OFF";

}

void loop()
{
EthernetClient cliente= servidor.available();
if(cliente)
{
boolean lineaenblanco=true;
while(cliente.connected())//Cliente conectado
{
if(cliente.available())
{
char c=cliente.read();
if(readString.length()<30)//Leemos petición HTTP caracter a caracter
{
readString.concat(c); //Almacenar los caracteres en la variable readString
}
if(c=='\n' && lineaenblanco)//Si la petición HTTP ha finalizado
{
int OPC = readString.indexOf("cod=");
if(readString.substring(OPC,OPC+8)=="cod=1234")
{
//provando el codigo si funciona prende el LED, e ingresa al index
creadorHTML="index";
digitalWrite(PIN_LED,HIGH);
state="ON";
}
else if (readString.substring(OPC,OPC+8)=="cod=4321")
{
//provando el codigo si funciona apaga el LED
digitalWrite(PIN_LED,LOW);
state="OFF";
}

if (creadorHTML.equals("login"))
{
//Cabecera HTTP estándar
cliente.print("");
cliente.print("");
cliente.print("");
cliente.print("");
cliente.print("Login");
cliente.print("");
cliente.print("");
cliente.print("");
cliente.print("");

cliente.stop();//Cierro conexión con el cliente
readString="";
}

///>>>>>>>Dibuja el index<<<<<<<<<<<<<<<<<<<<<
else if (creadorHTML.equals("index"))
{
cliente.print("");
cliente.print("");
cliente.print("");

cliente.print("Selección de módulo");
cliente.print("");
cliente.print("");
cliente.print("");
cliente.stop();//Cierro conexión con el cliente
readString="";
}

else
{
cliente.print("");
cliente.print("");
cliente.print("");
cliente.print("Selección de módulo");
cliente.print("");
cliente.print("

Problema con el if

"); cliente.print("</body"); cliente.print(""); cliente.stop();//Cierro conexión con el cliente readString="";

}
}
}
}
}
}

Those Strings are killing you. The massive amount of literals is killing you.

The literals can be dealt with easily.
cliente.print(F(""));
Wrapping the literals in the F() macro will keep them from being copied into SRAM at run time.

Ditching the String class is more complicated, but it is essential if your sketch is to run for more than a few minutes at a time.

PaulS:
Those Strings are killing you. The massive amount of literals is killing you.

The literals can be dealt with easily.
cliente.print(F(""));
Wrapping the literals in the F() macro will keep them from being copied into SRAM at run time.

Ditching the String class is more complicated, but it is essential if your sketch is to run for more than a few minutes at a time.

I did that and work so good!! PaulS da rulz ! thx for all guys