Go Down

Topic: WiFi available example doesn't work (Read 894 times) previous topic - next topic

contecavour

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

Code: [Select]
#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



PaulS

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.
The art of getting good answers lies in asking good questions.

contecavour

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

Impossible to connect to...
Reload...

Grazie

Go Up