TroubleshootingArduino

DFR0850 - Ethernet and PoE Shield for Arduino - W5500 Chipset with Arduino UNO R3

userHead Antoine.Patte 2023-11-05 01:06:56 235 Views0 Replies

I have try a first basic code with a Arduino UNO R3 and also with an Arduino MEGA. It's working well on the mega, the shield is discover and I can use it.

But, the same code on a Arduino UNO R3 is not working, I receveive the message Ethernet shield was not found.

 

What I need to do to be able to use this shield on an Arduino UNO R3 ?

 

#include <SPI.h>

#include <Ethernet.h>


 

byte mac[] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED};

IPAddress ip(10, 0, 0, 177);


 

void setup() {

// You can use Ethernet.init(pin) to configure the CS pin

//Ethernet.init(10); // Most Arduino shields

//Ethernet.init(5); // MKR ETH Shield

//Ethernet.init(0); // Teensy 2.0

//Ethernet.init(20); // Teensy++ 2.0

//Ethernet.init(15); // ESP8266 with Adafruit FeatherWing Ethernet

//Ethernet.init(33); // ESP32 with Adafruit FeatherWing Ethernet




 

Serial.begin(9600);

Serial.println(".: Initialisation :.");

Ethernet.begin(mac, ip);


 

if (Ethernet.hardwareStatus() == EthernetNoHardware) {

Serial.println("Ethernet shield was not found.");

}

else if (Ethernet.hardwareStatus() == EthernetW5100) {

Serial.println("W5100 Ethernet controller detected.");

}

else if (Ethernet.hardwareStatus() == EthernetW5200) {

Serial.println("W5200 Ethernet controller detected.");

}

else if (Ethernet.hardwareStatus() == EthernetW5500) {

Serial.println("W5500 Ethernet controller detected.");

}

 

}


 

void loop() {

auto link = Ethernet.linkStatus();

Serial.print("Link status: ");

switch (link) {

case Unknown:

Serial.println("Unknown");

break;

case LinkON:

Serial.println("ON");

break;

case LinkOFF:

Serial.println("OFF");

break;

}

delay(1000);

}