I'm currently working on creating a remotely controlled servo over wifi and, as of now, all the example projects I have found have been ethernet based. I spliced the Ethernet code with the sample wifi web server code however when they are together I can't get the wifi status printed it just continually attempts to connect to the server. Any help would be greatly appreciated. I'll attach the code (without the ssid and password)
Insure your router's wireless security is set to WPA-PSK or WPA2-PSK.
Insure your network name (SSID) is correct (case sensitive).
Insure your password is correct (case sensitive).
Ravenclawnerd:
That is wholly unhelpful but thanks anyway.
My bad. I didn't realize you are a wireless network specialist.
Try this code. What firmware version does this sketch display?
#include <SPI.h>
#include <WiFi.h>
char ssid[] = ""; // your network SSID (name)
char pass[] = ""; // your network password
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");
// don't continue:
while(true);
}
Serial.print("Firmware version: ");
Serial.println(WiFi.firmwareVersion());
// 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);
}
Serial.println("connected");
}
void loop() {
}
No sd card in the slot is ok. If you had one, I would have recommended removing it for your test.
You should upgrade the firmware if you plan on using IDE v1.0.5 or v1.5.x. It is a bit of a pain in the backside, but once it is done, it will work better. Here is a link that covers the upgrade and some wifi library bug fixes. I hear MattS-UK has good stuff on his page to help with the upgrade. http://forum.arduino.cc/index.php?topic=204029.0