Skip to content

SD: remove any reference to pinMode(10, OUTPUT) in the examples #2974

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 15, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions libraries/SD/examples/CardInfo/CardInfo.ino
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,6 @@ void setup()


Serial.print("\nInitializing SD card...");
// On the Ethernet Shield, CS is pin 4. It's set as an output by default.
// 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); // change this to 53 on a mega


// we'll use the initialization code from the utility libraries
// since we're just testing if the card is working!
Expand Down
7 changes: 0 additions & 7 deletions libraries/SD/examples/Datalogger/Datalogger.ino
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@
#include <SPI.h>
#include <SD.h>

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

void setup()
Expand All @@ -39,9 +35,6 @@ 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);

// see if the card is present and can be initialized:
if (!SD.begin(chipSelect)) {
Expand Down
7 changes: 0 additions & 7 deletions libraries/SD/examples/DumpFile/DumpFile.ino
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@
#include <SPI.h>
#include <SD.h>

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

void setup()
Expand All @@ -39,9 +35,6 @@ 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);

// see if the card is present and can be initialized:
if (!SD.begin(chipSelect)) {
Expand Down
5 changes: 0 additions & 5 deletions libraries/SD/examples/Files/Files.ino
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ void setup()


Serial.print("Initializing SD card...");
// On the Ethernet Shield, CS is pin 4. It's set as an output by default.
// 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!");
Expand Down
5 changes: 0 additions & 5 deletions libraries/SD/examples/ReadWrite/ReadWrite.ino
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ void setup()


Serial.print("Initializing SD card...");
// On the Ethernet Shield, CS is pin 4. It's set as an output by default.
// 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!");
Expand Down
5 changes: 0 additions & 5 deletions libraries/SD/examples/listfiles/listfiles.ino
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,6 @@ void setup()
}

Serial.print("Initializing SD card...");
// On the Ethernet Shield, CS is pin 4. It's set as an output by default.
// 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!");
Expand Down
2 changes: 1 addition & 1 deletion libraries/SD/library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=SD
version=1.0.1
version=1.0.2
author=Arduino, SparkFun
maintainer=Arduino <info@arduino.cc>
sentence=Enables reading and writing on SD cards. For all Arduino boards.
Expand Down