Problema wifi shield progetto maturità

Ciao ragazzi,
scusate se la sezione non è corretta ma ho un problema urgente con la wifi shield ufficiale di arduino (mi serve per la maturità e manca poco =( ).
L'intenzione è di caricare un sito web con 4 link su arduino e riuscire a far girare le ruote di un droid rover da un sito web.
Componenti utilizzati:
-arduino UNO
-wifi shield arduino http://arduino.cc/en/Main/ArduinoWiFiShield
-motor shield l298p
-4 motori
-rover kit

La wifi shield si connette al telefono(android) utilizzando il router wifi, ma una volta collegata non riesco a visualizzare il codice caricato contenente la mia pagina web.
Sullo smartphone mi risulta che la wifi shield si colleghi ed abbia l'indirizzo 192.168.43.105, andando con chrome all'indirizzo http://192.168.43.105 mi dice --> impossibile collegarsi a 192.168.43.105.

Il codice è il seguente(spudoratamente copiato dal sito di arduino XD):

/*
  WiFi Web Server
 
 A simple web server that shows the value of the analog input pins.
 using a WiFi shield.
 
 This example is written for a network using WPA encryption. For 
 WEP or WPA, change the Wifi.begin() call accordingly.
 
 Circuit:
 * WiFi shield attached
 * Analog inputs attached to pins A0 through A5 (optional)
 
 created 13 July 2010
 by dlf (Metodo2 srl)
 modified 31 May 2012
 by Tom Igoe

 */

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


char ssid[] = "yourNetwork";      // your network SSID (name) 
char pass[] = "secretPassword";   // your network password
int keyIndex = 0;                 // your network key Index number (needed only for WEP)

int status = WL_IDLE_STATUS;

WiFiServer server(80);

void setup() {
  //Initialize serial and wait for port to open:
  Serial.begin(9600); 
  while (!Serial) {
    ; // wait for serial port to connect. Needed for Leonardo only
  }
  
  // check for the presence of the shield:
  if (WiFi.status() == WL_NO_SHIELD) {
    Serial.println("WiFi shield not present"); 
    // don't continue:
    while(true);
  } 
  
  // attempt to connect to Wifi network:
  while ( status != WL_CONNECTED) { 
    Serial.print("Attempting to connect to SSID: ");
    Serial.println(ssid);
    // Connect to WPA/WPA2 network. Change this line if using open or WEP network:    
    status = WiFi.begin(ssid, pass);

    // wait 10 seconds for connection:
    delay(10000);
  } 
  server.begin();
  // you're connected now, so print out the status:
  printWifiStatus();
}


void loop() {
  // listen for incoming clients
  WiFiClient client = server.available();
  if (client) {
    Serial.println("new client");
    // an http request ends with a blank line
    boolean currentLineIsBlank = true;
    while (client.connected()) {
      if (client.available()) {
        char c = client.read();
        Serial.write(c);
        // if you've gotten to the end of the line (received a newline
        // character) and the line is blank, the http request has ended,
        // so you can send a reply
        if (c == '\n' && currentLineIsBlank) {
          // send a standard http response header
          client.println("HTTP/1.1 200 OK");
          client.println("Content-Type: text/html");
          client.println("Connection: close");  // the connection will be closed after completion of the response
          client.println("Refresh: 5");  // refresh the page automatically every 5 sec
          client.println();
          client.println("<!DOCTYPE HTML>");
          client.println("<html>");
          // output the value of each analog input pin
          for (int analogChannel = 0; analogChannel < 6; analogChannel++) {
            int sensorReading = analogRead(analogChannel);
            client.print("analog input ");
            client.print(analogChannel);
            client.print(" is ");
            client.print(sensorReading);
            client.println("
");       
          }
          client.println("</html>");
           break;
        }
        if (c == '\n') {
          // you're starting a new line
          currentLineIsBlank = true;
        } 
        else if (c != '\r') {
          // you've gotten a character on the current line
          currentLineIsBlank = false;
        }
      }
    }
    // give the web browser time to receive the data
    delay(1);
    
    // close the connection:
    client.stop();
    Serial.println("client disonnected");
  }
}


void printWifiStatus() {
  // print the SSID of the network you're attached to:
  Serial.print("SSID: ");
  Serial.println(WiFi.SSID());

  // print your WiFi shield's IP address:
  IPAddress ip = WiFi.localIP();
  Serial.print("IP Address: ");
  Serial.println(ip);

  // print the received signal strength:
  long rssi = WiFi.RSSI();
  Serial.print("signal strength (RSSI):");
  Serial.print(rssi);
  Serial.println(" dBm");
}

Prima di tutto, essendo il tuo primo post, ti consiglio di presentarti QUI e di leggere con attenzione il REGOLAMENTO ...

... poi, come da suddetto regolamento, punto 7, il codice deve essere racchiuso dentro gli appositi tag "CODE", quindi edita il tuo post e correggi e infine ... dubito che potrai fare quello vuoi fare visto che lo shield WiFi mi sembra abbia pin in conflitto con il motor shield ... verifica !

Guglielmo

Come da reference dei prodotti ...

... il WiFi shield usa i pin : 11, 12, 13, 10 e 4

... il motor shield usa i pin : A0, A1, 3, 8, 9, 11, 12, 13

Il WiFi usa i pin 11, 12 e 13 per il bus SPI, la motor li usa il 11 e 12 per la direzione ed il 13 per il PWM.

Guglielmo

La motor shield per adesso è scollegata e non riesco comunque a vedere il sito della pagina web

Non ho mai usato la shield wifi ma provo ad aiutarti :stuck_out_tongue:

La rete wifi che tipo di protezione ha?
Arduino cosa stampa nel monitor seriale?

edit: in questa discussione (WiFi Shield unable to connect - Networking, Protocols, and Devices - Arduino Forum) qualcuno ha risolto il problema passando dalla versione dell'ide 1.0.5 alla 1.0.2. Mi pare di capire che per farla funzionare meglio con le versioni dell'ide più recenti si debba aggiornare il firmware della shield (non vorrei dire cavolate :zipper_mouth_face:). Magari fai una prova con la versione 1.0.2, non si mai.
Le versioni vecchie si scaricano qua: http://arduino.cc/en/Main/OldSoftwareReleases

Ciao!

Davide311:
qualcuno ha risolto il problema passando dalla versione dell'ide 1.0.5 alla 1.0.2. Mi pare di capire che per farla funzionare meglio con le versioni dell'ide più recenti si debba aggiornare il firmware della shield ...

Esatto !

Con le ultime versioni dell'IDE è stata cambiata la libreria che colloquia con lo shield WiFi e quindi ... occorre aggiornare il firmware dello shield.

Per fare una prova si può usare, come suggerito, l'IDE 1.0.2, ma poi ... occorre necessariamente aggiornare visto che, le versioni successive risolvono altri problemi e che occorre sempre usare l'ultima versione rilasciata.

Guglielmo