Arduino UNO WiFi webserver

Hi.
When I try to connect to my Arduino webserver from more than one location, things dont work anymore.
It works fine if I connect from only one location.
I am no expert in programming, but as long as it works when accessing from one location and not several, I guess my scetch is not the problem.

Anyone had the same problem?
Here is the scetch:

#include <UnoWiFiDevEd.h>

void setup()
{
Wifi.begin();
Wifi.println("Web Server is up");
pinMode(8,INPUT);
}

void loop()
{
while(Wifi.available())
{
process(Wifi);
}
delay(50);
}

void process(WifiData client)
{
String command = client.readStringUntil('/'); // read the command

if (command == "webserver")
{
WebServer(client);
}
}
void WebServer(WifiData client)
{
client.println("HTTP/1.1 200 OK");
client.println("Content-Type: text/html");
client.println("Connection: close");
client.println("Refresh: 0.6"); // refresh the page automatically every 0,6sec
client.println();
client.println("");
client.println(" Aas Elektronikk AS WIFI I/O ");
client.print("");
{
int analogChannel = 0;
double sample=0;
double value=0;
double high=0;
double low=1024;
int i=0;
int diff=0;
double Vrms=0;
double corr=0.338;
{
for (i=0; i<600; i++)
{
sample=analogRead(analogChannel);
{
low=min(low, sample);
high=max(high, sample);
}
delay(1);
}
diff=abs(high-low);
Vrms=(0.338diff(5.0/1024.0));

client.println("

");
client.print("
");
client.print("Signal (Vrms) : "); // Display measured value
client.print(Vrms, 3); // 3 digits after comma
client.print("
");
client.print("

");
client.print("
");
}
//delay(1);
}
client.print("");
client.println("");
client.print(DELIMITER); // very important to end the communication !!!
}

{
Why is
{
your code
{
full of useless curly braces?
}
}
}

What, exactly, happens when you connect from a different "location"? Does "location" refer to the physical device you are using to connect? To the local area network that the wireless router that the device is connecting to? To the physical latitude/longitude/elevation where the device is located?

Hi.
When I try to connect to the Arduino(192.168.240.1/arduino/webserver) from more than one computer(client), the problem occurs.
Sorry for my bad explanation, English is not my native tounge.

Braces:
I was not aware that the braces was useless.
The program works fine when I connect from only one computer, so I dont think the braces are the problem.

As I stated I am no expert in programming.
I appreciate your interest. :slight_smile:

why do you use it in AP mode?

Hi.
Well, maybe that is the problem..
The code (webserver) is basically a copy from something I found on the net.
I am a total newbie in this field, and as it apparently works, I thought nothing more of it.

Thank you for making me aware of this, I will start looking and hopefully find a solution.

:slight_smile:

know you board
Uno WiFi & WiFi Link unofficial documentation