User manual

if (sendCom("AT+CIPSEND=" + String(connectionId) + "," +
String(webpage.length()), ">"))
{
esp8266.print(webpage);
esp8266.find("SEND OK");
success &= sendCom("AT+CIPCLOSE=" + String(connectionId),
"OK");
}
else
{
success = false;
}
return success;
}
The loop-routine now waits for a request query. When this arrives, the function
sendWebsite() will be called, with the result of the createWebsite()-function hand-
ed over to it as a parameter. This way, the length of the text can be determined
with the length()-
function. After transfer of the website, the connection is finally closed again with
the AT+CIPCLOSE-command. Switching of the LED is also part of the loop-
routine and will differ slightly from the preceding chart. How this is done precisely
is made clear in the following HTML crash course.
4.4 | Insert: HTML crash course
This chapter will contain a brief HTML crash course. I want to specifically focus on
the creation of websites for controlling the NanoESP. The course will cover the
basic structures of an HTML document, creation of in- and output elements and
finally integration of own websites into the Arduino program.
An HTML file is always characterised by <HTML> at the beginning of the docu-
ment. The document end should be marked with </HTML>. Usually, the start and
end of a section or element are displayed comparably, as you can also see in the
header. The header contains important information and shapes, e.g. the title of the
website to be displayed in the browser bar in this case. In this case, the header
contains another piece of information that does not belong to the basics of HTML