Hi everyone,
I've successful paired my Arduino Uno with the WiFly wifi shield from sparkfun...
I can connect to my wifi and make a get request to google using the following code:
Client client("www.google.com", 80);
void request(){
Serial.println("Connecting to server");
if(client.connect()){
Serial.println("Connected to server");
client.println("GET /search?something HTTP/1.0");
client.println();
}else{
Serial.println("Failed to connect...");
}
}
However if I try to make a request to a machine on the same wifi using this code:
byte server[] = {192, 168, 0, 7};
Client client(server, 80);
void request(){
Serial.println("Connecting to server");
if(client.connect()){
Serial.println("Connected to server");
client.println("GET /test.php HTTP/1.0");
client.println();
}else{
Serial.println("Failed to connect...");
}
}
It doesn't work...
I can however type http://192.168.0.7/test.php into the browser on a machine on the same wifi and I get my page..
Any ideas???
Thanks in advanced