Skip to content

Commit d72bc63

Browse files
committed
Merge pull request #2974 from facchinm/test_2659_2
SD: remove any reference to pinMode(10, OUTPUT) in the examples
2 parents b41e4a3 + d3a6c37 commit d72bc63

File tree

7 files changed

+1
-36
lines changed

7 files changed

+1
-36
lines changed

libraries/SD/examples/CardInfo/CardInfo.ino

-6
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,6 @@ void setup()
4444

4545

4646
Serial.print("\nInitializing SD card...");
47-
// On the Ethernet Shield, CS is pin 4. It's set as an output by default.
48-
// Note that even if it's not used as the CS pin, the hardware SS pin
49-
// (10 on most Arduino boards, 53 on the Mega) must be left as an output
50-
// or the SD library functions will not work.
51-
pinMode(10, OUTPUT); // change this to 53 on a mega
52-
5347

5448
// we'll use the initialization code from the utility libraries
5549
// since we're just testing if the card is working!

libraries/SD/examples/Datalogger/Datalogger.ino

-7
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@
2323
#include <SPI.h>
2424
#include <SD.h>
2525

26-
// On the Ethernet Shield, CS is pin 4. Note that even if it's not
27-
// used as the CS pin, the hardware CS pin (10 on most Arduino boards,
28-
// 53 on the Mega) must be left as an output or the SD library
29-
// functions will not work.
3026
const int chipSelect = 4;
3127

3228
void setup()
@@ -39,9 +35,6 @@ void setup()
3935

4036

4137
Serial.print("Initializing SD card...");
42-
// make sure that the default chip select pin is set to
43-
// output, even if you don't use it:
44-
pinMode(10, OUTPUT);
4538

4639
// see if the card is present and can be initialized:
4740
if (!SD.begin(chipSelect)) {

libraries/SD/examples/DumpFile/DumpFile.ino

-7
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@
2323
#include <SPI.h>
2424
#include <SD.h>
2525

26-
// On the Ethernet Shield, CS is pin 4. Note that even if it's not
27-
// used as the CS pin, the hardware CS pin (10 on most Arduino boards,
28-
// 53 on the Mega) must be left as an output or the SD library
29-
// functions will not work.
3026
const int chipSelect = 4;
3127

3228
void setup()
@@ -39,9 +35,6 @@ void setup()
3935

4036

4137
Serial.print("Initializing SD card...");
42-
// make sure that the default chip select pin is set to
43-
// output, even if you don't use it:
44-
pinMode(10, OUTPUT);
4538

4639
// see if the card is present and can be initialized:
4740
if (!SD.begin(chipSelect)) {

libraries/SD/examples/Files/Files.ino

-5
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,6 @@ void setup()
3232

3333

3434
Serial.print("Initializing SD card...");
35-
// On the Ethernet Shield, CS is pin 4. It's set as an output by default.
36-
// Note that even if it's not used as the CS pin, the hardware SS pin
37-
// (10 on most Arduino boards, 53 on the Mega) must be left as an output
38-
// or the SD library functions will not work.
39-
pinMode(10, OUTPUT);
4035

4136
if (!SD.begin(4)) {
4237
Serial.println("initialization failed!");

libraries/SD/examples/ReadWrite/ReadWrite.ino

-5
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,6 @@ void setup()
3333

3434

3535
Serial.print("Initializing SD card...");
36-
// On the Ethernet Shield, CS is pin 4. It's set as an output by default.
37-
// Note that even if it's not used as the CS pin, the hardware SS pin
38-
// (10 on most Arduino boards, 53 on the Mega) must be left as an output
39-
// or the SD library functions will not work.
40-
pinMode(10, OUTPUT);
4136

4237
if (!SD.begin(4)) {
4338
Serial.println("initialization failed!");

libraries/SD/examples/listfiles/listfiles.ino

-5
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,6 @@ void setup()
3535
}
3636

3737
Serial.print("Initializing SD card...");
38-
// On the Ethernet Shield, CS is pin 4. It's set as an output by default.
39-
// Note that even if it's not used as the CS pin, the hardware SS pin
40-
// (10 on most Arduino boards, 53 on the Mega) must be left as an output
41-
// or the SD library functions will not work.
42-
pinMode(10, OUTPUT);
4338

4439
if (!SD.begin(4)) {
4540
Serial.println("initialization failed!");

libraries/SD/library.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=SD
2-
version=1.0.1
2+
version=1.0.2
33
author=Arduino, SparkFun
44
maintainer=Arduino <info@arduino.cc>
55
sentence=Enables reading and writing on SD cards. For all Arduino boards.

0 commit comments

Comments
 (0)