Pages: [1]   Go Down
Author Topic: WiFi available example doesn't work  (Read 437 times)
0 Members and 1 Guest are viewing this topic.
Milan
Offline Offline
Sr. Member
****
Karma: 0
Posts: 375
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have Arduino UNO and original WiFI shield.
I have tried
http://arduino.cc/en/Reference/WiFiServerAvailable

Code:
#include <SPI.h>
#include <WiFi.h>

char ssid[] = "Network";          //  your network SSID (name)
char pass[] = "myPassword";   // your network password
int status = WL_IDLE_STATUS;

WiFiServer server(80);

void setup() {
  // initialize serial:
  Serial.begin(9600);
  Serial.println("Attempting to connect to WPA network...");
  Serial.print("SSID: ");
  Serial.println(ssid);

  status = WiFi.begin(ssid, pass);
  if ( status != WL_CONNECTED) {
    Serial.println("Couldn't get a wifi connection");
    while(true);
  }
  else {
    server.begin();
    Serial.print("Connected to wifi. My address:");
    IPAddress myAddress = WiFi.localIP();
    Serial.println(myAddress);

  }
}

void loop() {
  // listen for incoming clients
  WiFiClient client = server.available();
  if (client) {

    if (client.connected()) {
      Serial.println("Connected to client");
    }

    // close the connection:
    client.stop();
  }
}
 

I'have set mi WiFi connectio, i obtai ip address, but if i browse the ip address...nothing happen.
What's the problem?

Thanks


Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 632
Posts: 50182
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
but if i browse the ip address...nothing happen.
What do you expect to happen? Perhaps it's just that your expectations are wrong.
Logged

Milan
Offline Offline
Sr. Member
****
Karma: 0
Posts: 375
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Impossibile collegarsi a 192.168.90.22.
Ricarica: 192.­168.­90.­22

Impossible to connect to...
Reload...

Grazie
Logged

Pages: [1]   Go Up
Jump to: