Wifi Shield Not Present

Hi everyone.

I am pretty new to the Arduino world, but I have programming background.
I just got an Arduino Uno R3 and an Arduino Wifi Shield with integrated antenna.

When I run a sketch to detect any wifi networks I get the “Wifi Shield not present”.

This is the code I used: (obviously where I defined the Wifi Network and Password I used my own)


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

// the IP address for the shield:
IPAddress ip(192, 168, 0, 177);

char ssid = “WIFI SSID”; // your network SSID (name)
char pass = “Password”; // your network password (use for WPA, or use as key for WEP)

int status = WL_IDLE_STATUS;

void setup()
{
// Initialize serial and wait for port to open:
Serial.begin(9600);

// check for the presence of the shield:
if (WiFi.status() == WL_NO_SHIELD) {
Serial.println(“WiFi shield not present”);
while(true); // don’t continue
}

WiFi.config(ip);

// 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);
}

// print your WiFi shield’s IP address:
Serial.print("IP Address: ");
Serial.println(WiFi.localIP());
}

void loop () {}


When I run the sketch I always enter the loop

// check for the presence of the shield:
if (WiFi.status() == WL_NO_SHIELD) {
Serial.println(“WiFi shield not present”);
while(true); // don’t continue
}

I removed the DFU jumper, so that is not a problem. Also the L9 LED blinks yellow (I read somewhere that it may blink in different colors depending on the connection or errors).

The Arduino is the R3 version, so I don’t have to jump the IOREF pin with the 3.3V pin.

Can anyone help? Any help would be greatly appreciated.

Thank You

If you have a SD card in the wifi shield's slot, remove it and try again.

Otherwise check the shield is seated firmly and completely onto the Arduino, especially the ICSP pins. Those are the SPI data lines.

Insure nothing else is connected to the Arduino/shield, like LEDs or the like, especially to D7 and D10-D13.