Hi,
I used a lot the microSD Shield Retail (RTL-09899) collecting some infos from analog and digital pins and writing on SD card, using the Example sketch (http://www.sparkfun.com/tutorial/microS … xample.pde) and the FAT16 Library (http://www.sparkfun.com/Code/FAT16.zip).
When I attached an Arduino Ethernet Shield (DEV-09026) and add some lines to the sketch I can´t write nothing to SD card anymore.
#include <Ethernet.h>
#include <SPI.h>
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
byte ip[] = { 192, 168, 2, 2 };
void setup(void)
{
Serial.begin(9600);
pinMode(10, OUTPUT);
card.init();
volume.init(card);
root.openRoot(volume);
digitalWrite(8, HIGH); // I set HIGH and LOW but I can´t write on SD Card
Ethernet.begin(mac, ip); // The only one line code to init Ethernet
digitalWrite(10, HIGH); // I set HIGH and LOW but I can´t write on SD Card
}
...... the code from Sparkfun without any ethernet code
When I disconnect a Ethernet Shield and comment the lines:
#include <Ethernet.h>
#include <SPI.h>
digitalWrite(8, HIGH); // I set HIGH and LOW but I can´t write on SD Card
Ethernet.begin(mac, ip); // The only one line code to init Ethernet
digitalWrite(10, HIGH); // I set HIGH and LOW but I can´t write on SD Card
the sketch wrote infos on SD Card again.
I read SPI modules don´t work simutaneously and I need to switch SD [pin 8] Xor Ethernet [pin 10] and I need to switch among then.
Is there a hint ou some code that permits to use both shields.