Pages: [1]   Go Down
Author Topic: Webserver / Refreshtime  (Read 33 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

// Create a client connection
Client client = server.available();
if (client) {
while (client.connected()) {
if (client.available()) {
char c = client.read();

//read char by char HTTP request
if (readString.length() < 100) {

//store characters to string
// readString.append(c);  removed by Katsu
readString = readString + c; // insert by Katsu
// very simple but it works...
}

Serial.print(c);  //output chars to serial port

if (c == '\n') {  //if HTTP request has ended



Wo steckt denn hier die Refreshtime?
Was bedeutet die 100 hinter readStringlength?

Peter
Logged

Germany S-H
Offline Offline
Faraday Member
**
Karma: 143
Posts: 3006
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Wo steckt denn hier die Refreshtime?

Nirgends, bzw. in dem Code, den Du nicht zeigst.

Was bedeutet die 100 hinter readStringlength?

Mit
Code:
if (readString.length() < 100)
{
  // Codeblock
}
wird der Codeblock nur dann ausgeführt, wenn die Länge Deines String-Objekts unter 100 ist.
Logged

Pages: [1]   Go Up
Jump to: