adafruit / sd Goto Github PK
View Code? Open in Web Editor NEWfixes & updates to the Arduino SD library - totally in progress. works but in beta
fixes & updates to the Arduino SD library - totally in progress. works but in beta
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!
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.
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
see
http://arduino.cc/forum/index.php/topic,59667.0.html
unfortunately unfixable unless Stream is updated to support a uint32_t return
until then, please use size() - position()
File.cpp:46: error: definition of implicitly-declared 'File::~File()'
File::~File(void) {exit status 1
definition of implicitly-declared 'File::~File()'
Every time I try to compile my code, this error appears
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 :-)
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.
I've seen official's one (https://github.com/arduino/Arduino/tree/master/libraries/SD/src) is based on the same code but it is updated more frequently.
Thanks
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
Demo code:
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.
Using the example and changing nothing, the code refuses to compile on version 1.8.8 of Arduino
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.