   for (uint8_t i=0; i<server.args(); i++){
     message += " " + server.argName(i) + ": " + server.arg(i) + "\n";
   }
-  server.send(404, "text/plain", message);
+  server.send(404, F("text/plain"), message);
   digitalWrite(led, 0);
 }
  
 void setup(void){
   Serial.begin(9600);
   Serial.println();
-  Serial.println("Logobot Wifi Interface");
+  Serial.println(F("Logobot Wifi Interface"));
   
   pinMode(led, OUTPUT);
   digitalWrite(led, 0);

  else if (server.hasArg("action"))
    Serial.println(server.arg("action")); 
  
  server.send(200, "text/plain", "ok");
  
  digitalWrite(led, 0);
}

ESP8266WebServer server(80);
const int led = 2;

const char page[] PROGMEM = R"~(

<!DOCTYPE html>
<meta name="viewport" content="width=device-width, initial-scale=1">
<html>
<head><title>Logobot Blue</title></head>
<body style="font-size: 24px;">
  
Distance: <input type="text" id="dist" value="1000" /><br />
<a href="#" onclick="l('BK', document.getElementById('dist').value);">Backward</a> : 
<a href="#" onclick="l('FD', document.getElementById('dist').value);">Forward</a><br/>

<hr/>

Angle: <input type="text" id="angle" value="90" /><br />
<a href="#" onclick="l('LT', document.getElementById('angle').value);">Left</a> : 
<a href="#" onclick="l('RT', document.getElementById('angle').value);">Right</a><br/>

<hr />
  
<button onclick="l('PU', null);">Pen Up</button>
<button onclick="l('PD', null);">Pen Down</button>

<hr />
  
<button onclick="l('ST', null);">Stop</button>
<button onclick="l('BZ', 500);">Horn</button>
  
<hr/>
  
<div><span id="lastCmd"></span>:<span id="lastResp"</span></div>
  
<script type="text/javascript">
    function l(cmd, dist) {
        var xhReq = new XMLHttpRequest();
        var uri = '/cmd?action=' + cmd;
        if (dist) { uri += '&dist=' + dist; }
        xhReq.open('GET', uri, true);
        xhReq.send();
        xhReq.onload = function () {
          document.getElementById('lastCmd').innerText = cmd + ' ' + dist;
          document.getElementById('lastResp').innerText = this.responseText;
        }
    };
</script>

</body>
</html>

)~";

void handleRoot() {
  digitalWrite(led, 1);
  server.send(200, F("text/html"), page);
  digitalWrite(led, 0);
}

