client.println lines cause stop in code working (solved)

Hi,

I am in my learning curve to start Home Automation I got with some google study a start of a working project. Arduino Uno with W5100 shield.
First step is to code with UNO and shield only.
Second step to code with webpage on SD card.
So I am now at step one.
I have some RC switches and later some sensor to read. Now I was on my way and I got it working with two buttons that can be clicked and performed the RC switches to go on / off. So I though I have some more switches so lets expand the skecth. NO NO. I have to reduce client.println lines to keep things working. Otherwise the buttons are not responding. Now the skecth is 20k so enough inside the 32 K. So is there a limitation in the client.println lines I am not aware of?
Skecth attached.

Assistance in the right direction would be appriciated.

Paco

forgot to attach the ino file.

webserver_single_page.ino (7.58 KB)

Between the use of the memory fragmenting String class and all those string literals in SRAM, you are almost certainly running out of memory.

Use the F() macro to keep the string literals out of SRAM:
Serial.print(F("server is at "));

That applies to the client.print() lines, too.

Thanks Paul for this info,

I gonna give it a try.
Let you know the result.

Paco

Works............perfect.

Thanks Paul as always.

Paco

So what is the shield thing, is that a special option for the UNO

I want to do a similar project using a webpage and SD Card so what Arduino's boards would be best?

rr1024:
So what is the shield thing, is that a special option for the UNO

I want to do a similar project using a webpage and SD Card so what Arduino's boards would be best?

Did you have a programming question?

The board I used is an UNO with on top an enthernetshield with WIZ5100 chip. On top of that a small protoshield that has the 433 RX and TX mounted. Attached code is running from the UNO itselve. SD card is next step.

Paco

You can get the below arduino board and a w5100 ethernet shield to get started.

http://www.ebay.com/itm/261653306720