Hi all. I want to write arduino program which receive string from web server. Here is my code. I cant receive the value;
if (clienta) {
boolean currentLineIsBlank = true;
while (clienta.connected()) {
Serial.print("Ready");
// satırın sonuna geldiyseniz (yeni satır aldı
// karakter) ve satır boş, http isteği sona ermiş,
// böylece bir cevap gönderebilirsiniz
// standart bir http yanıtı üstbilgisi gönder
clienta.println("HTTP/1.1 200 OK");
clienta.println("");
clienta.println();
clienta.print("");
clienta.println("");
clienta.println("First name:
");
clienta.println("<input type=""text"" name=""firstname"">
");
clienta.println("<input type=""submit"" value=""Submit"">");
clienta.println("");
clienta.print("");
delay(500);
if (clienta.available()) {
char c = client.read();
if (readString.length() < 100) {
readString += c;
}
Serial.print(readString);
break;
}
}
delay(1);
clienta.stop ();
}
you must read the request and determine if it is request to get the page or request sending data of the html form
Here is my code.
That is not ALL of your code, and it looks like sh*t.
Use Tools + Auto Format before posting ALL of your code.