Hello, I cannot configure Ethernet on Leonardo R3 ETH with simple example !
It always return 0.172.172.172
I use Gui on windows 1.81, or on linux 2.1.0.5 or webeditor recently.
What's wrong ?
#include <SPI.h>
#include <Ethernet.h>
// the media access control (ethernet hardware) address for the shield:
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
//the IP address for the shield:
byte server[] = { 192, 168, 1, 177 };
byte dnse[] = { 192, 168, 1, 1 };
byte gateway[] = { 192, 168, 1, 1 };
byte subnet[] = { 255, 255, 255, 0 };
void setup()
{
Serial.begin(9600);// while the serial stream is not open, do nothing:
while (!Serial) ;
delay(5000);
Ethernet.begin(mac, server, dnse, gateway, subnet);
Serial.print("server is at ");
Serial.println(Ethernet.localIP());
}
void loop () {
delay(5000);
Serial.print("server is at ");
Serial.println(Ethernet.localIP());
}