Hello,
I'm trying to use my new ehternet shield 2 ( Wiznet W5500) with a UNO rev3 and a Mega.
Everytime I try to give it an ip and check the ip with Ethernet.localIP() I get a strange ip adress in return.
I have the 1.6.5 IDE, i've tried with an external power, i've rebooted, unplugged, resetted, nothing works ...
I'm trying this code to debug
#include <SPI.h>
#include <Ethernet.h>
byte mac[] = { 0x90, 0xA2, 0xDA, 0x10, 0x03, 0xF0 };
IPAddress ip(192,168,1,101);
void setup() {
Serial.begin(9600);
// disable SD SPI
pinMode(4,OUTPUT);
digitalWrite(4,HIGH);
// Start ethernet
Serial.println(F("Starting ethernet..."));
Ethernet.begin(mac, ip);
Serial.println(Ethernet.localIP());
delay(2000);
Serial.println(F("Ready"));
}
void loop() {
}
and the output is :
Starting ethernet...
0.112.112.112
Ready
Should I use a dedicated library for this shield ? isn't the Ethernet library bundled with the IDE supposed to be compatible ? I'm a bit lost ...
Thank you for your help.