Loading...
Pages: 1 2 [3]   Go Down
Author Topic: Arduino + official ethernet shield + SD -> all working together.  (Read 6257 times)
0 Members and 1 Guest are viewing this topic.
France
Offline Offline
Sr. Member
****
Karma: 2
Posts: 378
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You are right, inserting the sd into the slot is stopping Server ethernet...

Does anyone knows why about this fact ?
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 11
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Bump
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 27
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I just spent a painful 20 hours banging on an arduino ethernet shield with an SD card trying to get them to work together.  This thread, ladyada's tutorial - all resulting in arduino crashing when switching between ethernet and SD - nothing worked.

Reason: I was using the Arduino IDE 1.0.1 - everything works when I went back to 1.0

Symptoms - garbage spat out into serial, setup() restarting, not being able to open the files, etc.

I want my weekend back  smiley-eek-blue
Logged

Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 50
Posts: 3450
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Mine works fine together using IDE v1.0.1. I use this setup with dhcp for the w5100:
Code:
#include <SD.h>
#include <SPI.h>
#include <Ethernet.h>
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };

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

  // 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");

  Serial.print("Starting ethernet..");
  if(!Ethernet.begin(mac)) Serial.println("failed");
  else Serial.println("ok");
  // Ethernet.begin() returns with its SPI enabled, so disable it
  digitalWrite(10,HIGH);
}

void loop() {
}
What does the serial monitor say? ok or failed?
I can't give you your weekend back.  smiley-sad

edit: Added missing double quote. My bad.  smiley-red
« Last Edit: July 03, 2012, 05:34:19 am by SurferTim » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you my friend.I had many problems but your setup process worked first time. smiley
Logged

Pages: 1 2 [3]   Go Up
Print
 
Jump to: