I'm sorry if this is in another post but every time I search I get no results.
I can't remember where I got this code:
#include <SPI.h>
#include <Ethernet.h>
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
// the router's gateway address:
byte gateway[] = { 192,168,2,1 };
// the subnet:
byte subnet[] = { 255, 255, 255, 0 };
IPAddress ip(192,168,2,2);
void setup() {
Serial.begin(9600);
// disable SD SPI
pinMode(4,OUTPUT);
digitalWrite(4,HIGH);
// Start ethernet
Serial.print(F("Starting ethernet..."));
Ethernet.begin(mac, ip);
Serial.println(Ethernet.localIP());
}
void loop() {
}
When using the serial monitoring it tells me
Starting ethernet...0.0.0.0
I remember reading in the post that if it showed this the SPI isn't communicating and to make sure the shield is seated all the way. They are.
Now I have 3 Arduino UNO's and 3 ethernet shields and I can't get any of them to bring up the IDE Webserver the one that comes with the IDE and they all 3 show:
Starting ethernet...0.0.0.0
Firewall is down so I know it isn't an issue.
When I do an ipconfig it tells me my gateway and subnet so I know those are correct. when I look in the router at the DHCP client list it doesn't show the ip address so I know it is unique.
What could be the cause of the SPI not communicating?
Thank you