DFRobot Interface Shield

I just received my DFRobot Interface Shield today but I can’t find any code to run the SD card-reader part of it.

It looks as if the SD card gadget connects to Arduino pins 10, 11, 12, 13 only. But which is what, I have no clue.

Arduino-0022\libraries\SD\examples\files\files.pde states the reader should attach to pins 11, 12, 13, and 4, leaving pin 10 alone

/*
  SD card basic file example
 
 This example shows how to create and destroy an SD card file 	
 The circuit:
 * SD card attached to SPI bus as follows:
 ** MOSI - pin 11
 ** MISO - pin 12
 ** CLK - pin 13
 ** CS - pin 4
 
 created   Nov 2010
 by David A. Mellis
 updated 2 Dec 2010
 by Tom Igoe
 
 This example code is in the public domain.
 	 
 */
#include <SD.h>

File myFile;

void setup()

etc
{

Do I need to change the pin-allocations? And if so, how?
Has anyone-else used the DFRobotics shield and could guide me, please?

Geoff

By now, I'm sure you know that you need to post links to the hardware, when you ask hardware questions In a software forum?). So, where's the link.

It looks as if the SD card gadget connects to Arduino pins 10, 11, 12, 13 only. But which is what, I have no clue.

Good thing the library does, then, eh?

Arduino-0022\libraries\SD\examples\files\files.pde states the reader should attach to pins 11, 12, 13, and 4, leaving pin 10 alone

Probably be a good idea to do that, then.

Do I need to change the pin-allocations?

Why do you think you need to?

Paul, I'm sorry. I thought this to be a software problem.

Since I can only get "Initialisation failed" from 'files.pde' and sod-all from anything-else, I sort-of guessed that CS pin 4 (which doesn't appear to be a physical connection on the actual board/shield, might just need to change ? If so, How? and to what?

Geoff

which doesn't appear to be a physical connection on the actual board/shield

It would be nice to verify that by looking at the schematic or documentation for the shield.

So, where's the link?

As requested, Paul, here is a link to the schematic

http://www.dfrobot.com/image/data/DFR0074/Interface%20shield%20V1.1%20sch.pdf

which is a linked from this page

Unfortunately, none of these indicate how to solve my original question - how to change the pin-numbers used by the various software?

Geoff

Unfortunately, none of these indicate how to solve my original question - how to change the pin-numbers used by the various software?

Why do you think you need to? You can define, in the SD.begin() call which chip/slave select pin to use. The other pins can not be changed - they depend on the underlying hardware to operate properly.

Kind of you to mention it.

So it really was a software problem, and I, a newbie believing that pin 10 must always be an output or the reader won't work, having no idea what " if (!SD.begin(4)) " is supposed to do, was sent chasing all sorts by your somewhat sarcastic comments.

As it happens, my son took a guess and we tried " if (!SD.begin(10)) " which seems to work.

Problem solved.

Thanks,

Geoff