title: Memory limits on Arduino
body: <p>I have recently bought an <a href="http://en.wikipedia.org/wiki/Arduino#ArduinoUno">Arduino Uno</a>, and now I am experimenting a bit with it. I have a couple of 18B20 sensors and an ENC28J60 network module connected to it, then I am making a sketch to allow me to connect to it from a browser and read out the temperatures either as a simple web page or as <a href="http://en.wikipedia.org/wiki/JSON">JSON</a>. The code that makes the web pages looks like this:</p>
  
  <pre><code>client.print("Inne: ");
  client.print(tempin);
  client.println("&lt;br /&gt;");
  client.print("Ute: ");
  client.print(tempout);
  client.print("&lt;br /&gt;&lt;br /&gt;");
  client.println(millis()/1000);
  //    client.print("&lt;a href=\"/json\"&gt;j&lt;/a&gt;");
  </code></pre>
  
  <p>The strange thing is: if I uncomment the last line, the sketch compiles fine, uploads fine, but I cannot get to connect to the board. The same thing happens if I add on some more characters in some of the other printouts. Thus, it looks to me as if I'm running into some kind of memory limit (the total size of the sketch is about 15&nbsp;KB, and there are some other strings used elsewhere in the code - and yes I know, I will rewrite it to use an array to store the temporaries, I've just stolen some code from an example).</p>
  
  <p>Is there any limit on how much memory I can use to store strings in an Arduino and are there any way to get around that? (using <a href="http://en.wikipedia.org/wiki/Graphical_user_interface">GUI</a> v 1.0.1 on a <a href="http://en.wikipedia.org/wiki/Debian">Debian</a> PC with GCC-AVR 4.3.5 and <a href="http://www.nongnu.org/avr-libc/">AVR Libc</a> 1.6.8).</p>