Comments (3)
Hi,
this is definitely a bug, in fact, if you have more than one SPI device you must call begin() each time you need to switch from another device to the SD card.
I have had the problem myself.
Solution:
in the file named SD.cpp, in function begin() (line 337) add this instruction before the return statement:
if(root.isOpen()) root.close();
this has solved the problem for me.
from sd.
This is not bug. You only need to initialise Sd library once. You can then make checks with File myfile = SD.open("file") that shall return file or 0 if not working. You can check if (myfile) then do work.
from sd.
this library fork is being archived - please use the SdFat Library instead (its much better) for any advanced SD card needs!
from sd.
Related Issues (10)
- SD.h error HOT 3
- multiple partitions HOT 1
- Has this library still make sense? HOT 2
- error: definition of implicitly-declared 'File::~File()' HOT 2
- SD.begin() doesn't work with Adafruit SD Breakout board HOT 1
- SoftSpi Not Working on DUE Board HOT 1
- overflow with int return of available()
- Error Compiling for Arduino/Genuino Uno HOT 1
- rewindDirectory() issue HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sd.