Ethernet shield and SD select

Hi,

I have been testing the SDcard function on the Ethernet shield. In my sketch, I had explicitly set pin 10 as output and pull it high.

When I load another sketch which will access the Ethernet, it hangs at the point in the sketch where "Ethernet.begin(mac)" is.

Please advise how I can switch back to the ethernet function. Do I have to set pin 10 low?

When I load another sketch which will access the Ethernet, it hangs at the point in the sketch where "Ethernet.begin(mac)" is.

You apparently did not read the stickies at the top of the forum. I suggest that now would be a good time to do so.

When I load another sketch which will access the Ethernet, it hangs at the point in the sketch where "Ethernet.begin(mac)" is.

You can remove the SD card, or add the pin 10 code to your existing ethernet code. You probably could add the below code to your other ethernet code to make it SD card compatable.

  // disable w5100 while setting up SD
  pinMode(10,OUTPUT);
  digitalWrite(10,HIGH);
  Serial.print("Starting SD..");
  if(!SD.begin(4)) Serial.println("failed");
  else Serial.println("ok");

  Ethernet.begin(mac, ip, gateway, gateway, subnet);

  //delay(2000);
  server.begin();
  Serial.println("Ready");