I am using arduino IDE 1.0.
Ethernet Sheild R3
Arduino: Duemilanove
SD card FAT file system formated on a mac
I am using the SD library.
I need to read the SD in setup. Then use the values to initialize the ethernet.
Any and all suggestions accepted.
The SD initialization always fails. I have tried the examples that only touch pin 10:
pinMode(10, OUTPUT);
But most references say to set pins 10 and 4 together.
I added delays just because of the failure.
I had the various values hardcoded. I am going to have 2-3 of these on the network and would rather have the parameters read from the SD card than have 2-3 copies of the code.
void setup()
{
// start the Ethernet connection
Serial.begin(9600);
delay(3000);
pinMode(10, OUTPUT);
digitalWrite(10, HIGH);
delay(100);
pinMode(4, OUTPUT);
digitalWrite(4, LOW);
delay(100);
if (!SD.begin(4)) {
Serial.println("initialization failed!");
return;
}