Clarifying difference between SD.begin(chipSelect) & card.init(SPI_HULL_SPEED, c

I'm new to working with the SD library.

Could someone point me to a new user explanation of the differences between initialising a card for use by applying:

SD.begin(chipSelect)

[as used in the ReadWrite.ino example] as opposed to

card.init(SPI_HALF_SPEED, chipSelect)

[as used in the CardInfo.ino example].

I would like to integrate functionality from both examples in one sketch.

SD is a wrapper for SdFat. When I wrote SdFat I designed three main classes, Sd2Card, SdVolume, and SdFile.

The Arduino group wrote a wrapper class to simplify I/O to SD cards that contains the three classes.

Since they correctly made these members private:

private:
  // These are required for initialization and use of sdfatlib
  Sd2Card card;
  SdVolume volume;
  SdFile root;

You can't easily integrate the functionality of both in one sketch.

You might want to look at SdFat without the wrapper since the version of SdFat in SD.h is very old. SdFat is here http://code.google.com/p/sdfatlib/downloads/list and betas/extras are here http://code.google.com/p/beta-lib/downloads/list.

I had this problem on Arduino Mega2560. Solved by using 4 pin arguments for SD.begin. I had to update SD-Master to a 'use any pin' version, but don't remember where I got it.

Hi Bill

Are you the architect of Fat16 library? I am new to Arduino....Love Arduino, but puzzle by SD.h I look at the examples included and header file

class is defined as SDClass and later renamed as SD? if card, volume and root are to be used, why declared as private?

anyhow, does your Fat16 library work with Adafruit MicroSD?

https://www.adafruit.com/product/254

fat16lib: SD is a wrapper for SdFat. When I wrote SdFat I designed three main classes, Sd2Card, SdVolume, and SdFile.

The Arduino group wrote a wrapper class to simplify I/O to SD cards that contains the three classes.

Since they correctly made these members private:

private:
  // These are required for initialization and use of sdfatlib
  Sd2Card card;
  SdVolume volume;
  SdFile root;

You can't easily integrate the functionality of both in one sketch.

You might want to look at SdFat without the wrapper since the version of SdFat in SD.h is very old. SdFat is here http://code.google.com/p/sdfatlib/downloads/list and betas/extras are here http://code.google.com/p/beta-lib/downloads/list.