Go Down

Topic: WiFi available example doesn't work (Read 541 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.

contecavour

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

Impossible to connect to...
Reload...

Grazie

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy