GithubHelp home page GithubHelp logo

sd's Introduction

this library fork is being archived - the Arduino SD lirbary has all these capabilities in it now

please use the SdFat Library instead for any advanced SD card needs! (its much better) 

---------------------------


** SD - a slightly more friendly wrapper for sdfatlib **

This library aims to expose a subset of SD card functionality in the
form of a higher level "wrapper" object.

License: GNU General Public License V3
         (Because sdfatlib is licensed with this.)

(C) Copyright 2010 SparkFun Electronics

Now better than ever with optimization, multiple file support, directory handling, etc - ladyada!

sd's People

Contributors

driverblock avatar ladyada avatar paintyourdragon avatar tdicola avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sd's Issues

SoftSpi Not Working on DUE Board

IDE Version : 1.6.9
Board Type: Due

The software spi not working for DUE board, connected SD card.
I changed

#if defined(__arm__) // Arduino Due Board follows

#ifndef Sd2PinMap_h
#define Sd2PinMap_h

#include <Arduino.h>

uint8_t const SS_PIN = 10;
uint8_t const MOSI_PIN = 11;
uint8_t const MISO_PIN = 12;
uint8_t const SCK_PIN = 13;

#endif // Sd2PinMap_h

But still same, i using CardInfo Example for test, SS pin is 10 and speed is SPI_QUARTER_SPEED.
The SD card Working with Hardware SPI. But i need SoftSpi for these LCD shields.

rewindDirectory() issue

if i add these three lines to the Loop() function it doesn't work as expected and i have seen it crash

delay(2000);
root.rewindDirectory();
printDirectory(root, 0);

i don't know exactly what is wrong but believe it has to do with the rewindDirectory() function

sorry i forgot to mention that this is the listfiles example that i am testing

multiple partitions

It seems to me like this code does not support SD cards with multiple partitions, like the Transcend SDHC Wi-Fi card. Unfortunately I dont have the skills to fix the code either, but I hope somebody else might have :-)

SD.h error

Compiler kicks an error - SD.h:47: error: multiple types in one declaration.

SD.h appears to be missing a semicolon at the end of the DirectoryEntry class on line 30. Adding the semicolon clears the error.

SD.begin() doesn't work with Adafruit SD Breakout board

  • Arduino board: Arduino Mega 2560

  • Arduino IDE version (found in Arduino -> About Arduino menu): 1.8.0

// TESTCODE
#include <SPI.h>
#include <SD.h>

void setup()
{
Serial.begin(57600);
if(!SD.begin(53))
{
Serial.print(F("SD CARD ERROR"));
while(1);
}
Serial.print(F("SD CARD OK"));
while(1);
}

void loop()
{
}

The Code works with the "SD by Arduino, Sparkfun" Lib version 1.0.9 but not with the version 1.1.0

Tested Examples from IDE[1]:
Example | SD 1.0.9 | SD 1.1.0 |
+++++++++++++++++++
Cardinfo | works | works |
Datalogger | works | "Card faild"
Dumpfile | works | "Card faild"
Files | works | "initialization failed!"
listfiles | works | "initialization failed!"
readwrite | works | "initialization failed!"

[1] - Set the CS-PIN to 53

SD.Begin(int, int. int. int) can only be called once.

Demo code:

include <SD.h>

void setup()
{
Serial.begin(115200);
Serial.println("Starting...");
if (!SD.begin(53,2,4,3)) { // chipSel, mosi, miso, sck
Serial.println(F("initialization failed!"));
} else {
Serial.println(F("initialization done."));
}

if (!SD.begin(53,2,4,3)) { // chipSel, mosi, miso, sck
Serial.println(F("initialization failed!"));
} else {
Serial.println(F("initialization done."));
}
}

void loop(void) {

}

Output:

Starting...
initialization done.
initialization failed!

Expected output:
Starting...
initialization done.
initialization done.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.