Hello ! i've got a big problem.I have an Arduino Duemilanove 168 & an Ethernet Shield.I want do an example from library but i don't figure out how to make it work.I have connected my ethernet shield directly to ethernet cable and nothing and after that i connect it to my laptop and nothing.I have a switch with all plugs for ethernet,for my laptop and for my ethernet shield.Please help me and sorry for my grammatical errors(i'm from RO).Here is my code:
#include <Ethernet.h>
byte mac[] = { 0x00, 0x54, 0x7c, 0x77, 0x89, 0x1B }; my mac
byte ip[] = { 89,68,33,125 }; // ip pc
byte server[] = { 209,85,135,147 }; // ip google
Client client(server, 80);
void setup()
{
Ethernet.begin(mac, ip);
Serial.begin(9600);
delay(1000);
Serial.println("Se conecteaza sau nu...");
if (client.connect()) {
Serial.println("<< CONECTAT >> ");
client.println("GET /search?q=arduino HTTP/1.0");
client.println();
} else {
Serial.println("Conexiune Frecata...");
}
}
void loop()
{
if (client.available()) {
char c = client.read();
Serial.print(c);
}
if (!client.connected()) {
Serial.println();
Serial.println("DECONECTAT...");
client.stop();
for(;
;
}
}