mirror of https://github.com/noisymime/Arduino.git
bug fixes to SD library examples
This commit is contained in:
parent
86e3d4ad7a
commit
4d3b263738
|
@ -34,7 +34,7 @@ void setup()
|
|||
Serial.print("Initializing SD card...");
|
||||
// make sure that the default chip select pin is set to
|
||||
// output, even if you don't use it:
|
||||
// pinMode(10, OUTPUT);
|
||||
pinMode(10, OUTPUT);
|
||||
|
||||
// see if the card is present and can be initialized:
|
||||
if (!SD.begin(chipSelect)) {
|
||||
|
|
|
@ -29,6 +29,7 @@ void setup()
|
|||
// Note that even if it's not used as the CS pin, the hardware SS pin
|
||||
// (10 on most Arduino boards, 53 on the Mega) must be left as an output
|
||||
// or the SD library functions will not work.
|
||||
pinMode(10, OUTPUT);
|
||||
|
||||
if (!SD.begin(4)) {
|
||||
Serial.println("initialization failed!");
|
||||
|
@ -74,3 +75,4 @@ void loop()
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -30,6 +30,7 @@ void setup()
|
|||
// Note that even if it's not used as the CS pin, the hardware SS pin
|
||||
// (10 on most Arduino boards, 53 on the Mega) must be left as an output
|
||||
// or the SD library functions will not work.
|
||||
pinMode(10, OUTPUT);
|
||||
|
||||
if (!SD.begin(4)) {
|
||||
Serial.println("initialization failed!");
|
||||
|
|
Loading…
Reference in New Issue