浏览代码

Delete unnecessary (and harmful) pinMode from examples

main
PaulStoffregen 9 年前
父节点
当前提交
24e6318a5c
共有 6 个文件被更改,包括 1 次插入27 次删除
  1. +0
    -5
      examples/CardInfo/CardInfo.ino
  2. +0
    -3
      examples/Datalogger/Datalogger.ino
  3. +0
    -3
      examples/DumpFile/DumpFile.ino
  4. +0
    -5
      examples/Files/Files.ino
  5. +1
    -6
      examples/ReadWrite/ReadWrite.ino
  6. +0
    -5
      examples/listfiles/listfiles.ino

+ 0
- 5
examples/CardInfo/CardInfo.ino 查看文件

@@ -48,11 +48,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

+ 0
- 3
examples/Datalogger/Datalogger.ino 查看文件

@@ -48,9 +48,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)) {

+ 0
- 3
examples/DumpFile/DumpFile.ino 查看文件

@@ -48,9 +48,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)) {

+ 0
- 5
examples/Files/Files.ino 查看文件

@@ -42,11 +42,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(chipSelect)) {
Serial.println("initialization failed!");

+ 1
- 6
examples/ReadWrite/ReadWrite.ino 查看文件

@@ -43,12 +43,7 @@ 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(chipSelect)) {
Serial.println("initialization failed!");
return;

+ 0
- 5
examples/listfiles/listfiles.ino 查看文件

@@ -42,11 +42,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(chipSelect)) {
Serial.println("initialization failed!");

正在加载...
取消
保存