Arduino nano + ethernet shield w5100

Hello community!

I have a small problem. A tried connect ethernet shield to arduino mega and everything works perfectly! But if I use the same code to arduino nano, it’s not working.

I have connected that same shield to arduino nano via ICSP and wired pin 4-4 and 10-10. On ethernet shield green and orange (near ethernet cable) leds are off and on is only one led (PWR)…

Here is my script:

#include <SPI.h>
#include <Ethernet.h>

byte mac[] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED};
IPAddress ip(192, 168, 2, 177);

EthernetServer server(80);

void setup()
{
 Serial.begin(9600);

 // disable SD SPI
 pinMode(4, OUTPUT);
 digitalWrite(4, HIGH);

 Ethernet.begin(mac, ip);
 server.begin();
 

 Serial.print("Server je na IP adrese: ");
 Serial.println(Ethernet.localIP());
}

void loop()
{}

I didn’t find nothing on internet what can help me… If you have some idea, I’ll be happy :slight_smile: Thanks you for your time. Have a nice day :slight_smile:

Arduino Mega has other Pins for the SPI Bus. You need to change the SPI Pins in the Header file of your ilbrary.

I think, problem is in another place.. USB has low current. Voltage is good.. But current is too low.. I try to use 12V/1,5A adapter and it was high.. Maybe 1A will be good..

Hi!

Why are you using ICSP pins?

On arduino nano SPI pins are D11 (MOSI) D12 (MISO) and D13 (SCK) and pin D10 function as SS (check on the schematic). You should match thous with the ones on the ethernet shield.

Arduino nano and arduino uno have the same pins names so you should change SPI pins on ethernet libraries.

If you want use SD pin D4 is the SS.

Hope you have allready solved your problem!