From 012b4b0f0f723622e378234c84bb8d33f4198287 Mon Sep 17 00:00:00 2001 From: "David A. Mellis" Date: Sun, 21 Nov 2010 17:11:17 -0500 Subject: [PATCH] Adding warning about leaving the hardware SS pin as an output. --- libraries/SD/examples/Files/Files.pde | 5 ++++- libraries/SD/examples/ReadWrite/ReadWrite.pde | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/libraries/SD/examples/Files/Files.pde b/libraries/SD/examples/Files/Files.pde index b306793d4..ca72e2193 100644 --- a/libraries/SD/examples/Files/Files.pde +++ b/libraries/SD/examples/Files/Files.pde @@ -6,7 +6,10 @@ void setup() { Serial.begin(9600); Serial.print("Initializing SD card..."); - // On the Ethernet Shield, CS is pin 4. + // On the Ethernet Shield, CS is pin 4. 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. if (!SD.begin(4)) { Serial.println("failed!"); return; diff --git a/libraries/SD/examples/ReadWrite/ReadWrite.pde b/libraries/SD/examples/ReadWrite/ReadWrite.pde index 1267dce00..3dc4cf19c 100644 --- a/libraries/SD/examples/ReadWrite/ReadWrite.pde +++ b/libraries/SD/examples/ReadWrite/ReadWrite.pde @@ -6,7 +6,10 @@ void setup() { Serial.begin(9600); Serial.print("Initializing SD card..."); - // On the Ethernet Shield, CS is pin 4. + // On the Ethernet Shield, CS is pin 4. 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. if (!SD.begin(4)) { Serial.println("failed!"); return;