Adds more comments on how to use sd on teensy audio boardmain
| The circuit: | The circuit: | ||||
| * SD card attached to SPI bus as follows: | * SD card attached to SPI bus as follows: | ||||
| ** MOSI - pin 11 on Arduino Uno/Duemilanove/Diecimila | |||||
| ** MOSI - pin 11 on Arduino Uno/Duemilanove/Diecimila, pin 7 on Teensy with audio board | |||||
| ** MISO - pin 12 on Arduino Uno/Duemilanove/Diecimila | ** MISO - pin 12 on Arduino Uno/Duemilanove/Diecimila | ||||
| ** CLK - pin 13 on Arduino Uno/Duemilanove/Diecimila | |||||
| ** CS - depends on your SD card shield or module. | |||||
| ** CLK - pin 13 on Arduino Uno/Duemilanove/Diecimila, pin 14 on Teensy with audio board | |||||
| ** CS - depends on your SD card shield or module - pin 10 on Teensy with audio board | |||||
| Pin 4 used here for consistency with other Arduino examples | Pin 4 used here for consistency with other Arduino examples | ||||
| void setup() | void setup() | ||||
| { | { | ||||
| //SPI.setMOSI(7); // Audio shield has MOSI on pin 7 | |||||
| //SPI.setSCK(14); // Audio shield has SCK on pin 14 | |||||
| // Open serial communications and wait for port to open: | // Open serial communications and wait for port to open: | ||||
| Serial.begin(9600); | Serial.begin(9600); | ||||
| while (!Serial) { | while (!Serial) { | 
| The circuit: | The circuit: | ||||
| * analog sensors on analog ins 0, 1, and 2 | * analog sensors on analog ins 0, 1, and 2 | ||||
| * SD card attached to SPI bus as follows: | * SD card attached to SPI bus as follows: | ||||
| ** MOSI - pin 11 | |||||
| ** MOSI - pin 11, pin 7 on Teensy with audio board | |||||
| ** MISO - pin 12 | ** MISO - pin 12 | ||||
| ** CLK - pin 13 | |||||
| ** CS - pin 4 | |||||
| ** CLK - pin 13, pin 14 on Teensy with audio board | |||||
| ** CS - pin 4, pin 10 on Teensy with audio board | |||||
| created 24 Nov 2010 | created 24 Nov 2010 | ||||
| modified 9 Apr 2012 | modified 9 Apr 2012 | ||||
| void setup() | void setup() | ||||
| { | { | ||||
| //UNCOMMENT THESE TWO LINES FOR TEENSY AUDIO BOARD: | |||||
| //SPI.setMOSI(7); // Audio shield has MOSI on pin 7 | |||||
| //SPI.setSCK(14); // Audio shield has SCK on pin 14 | |||||
| // Open serial communications and wait for port to open: | // Open serial communications and wait for port to open: | ||||
| Serial.begin(9600); | Serial.begin(9600); | ||||
| while (!Serial) { | while (!Serial) { | 
| The circuit: | The circuit: | ||||
| * SD card attached to SPI bus as follows: | * SD card attached to SPI bus as follows: | ||||
| ** MOSI - pin 11 | |||||
| ** MOSI - pin 11, pin 7 on Teensy with audio board | |||||
| ** MISO - pin 12 | ** MISO - pin 12 | ||||
| ** CLK - pin 13 | |||||
| ** CS - pin 4 | |||||
| ** CLK - pin 13, pin 14 on Teensy with audio board | |||||
| created 22 December 2010 | created 22 December 2010 | ||||
| by Limor Fried | by Limor Fried | ||||
| void setup() | void setup() | ||||
| { | { | ||||
| //UNCOMMENT THESE TWO LINES FOR TEENSY AUDIO BOARD: | |||||
| //SPI.setMOSI(7); // Audio shield has MOSI on pin 7 | |||||
| //SPI.setSCK(14); // Audio shield has SCK on pin 14 | |||||
| // Open serial communications and wait for port to open: | // Open serial communications and wait for port to open: | ||||
| Serial.begin(9600); | Serial.begin(9600); | ||||
| while (!Serial) { | while (!Serial) { | 
| This example shows how to create and destroy an SD card file | This example shows how to create and destroy an SD card file | ||||
| The circuit: | The circuit: | ||||
| * SD card attached to SPI bus as follows: | * SD card attached to SPI bus as follows: | ||||
| ** MOSI - pin 11 | |||||
| ** MOSI - pin 11, pin 7 on Teensy with audio board | |||||
| ** MISO - pin 12 | ** MISO - pin 12 | ||||
| ** CLK - pin 13 | |||||
| ** CS - pin 4 | |||||
| ** CLK - pin 13, pin 14 on Teensy with audio board | |||||
| ** CS - pin 4, pin 10 on Teensy with audio board | |||||
| created Nov 2010 | created Nov 2010 | ||||
| by David A. Mellis | by David A. Mellis | ||||
| void setup() | void setup() | ||||
| { | { | ||||
| //UNCOMMENT THESE TWO LINES FOR TEENSY AUDIO BOARD: | |||||
| //SPI.setMOSI(7); // Audio shield has MOSI on pin 7 | |||||
| //SPI.setSCK(14); // Audio shield has SCK on pin 14 | |||||
| // Open serial communications and wait for port to open: | // Open serial communications and wait for port to open: | ||||
| Serial.begin(9600); | Serial.begin(9600); | ||||
| while (!Serial) { | while (!Serial) { | 
| This example shows how to read and write data to and from an SD card file | This example shows how to read and write data to and from an SD card file | ||||
| The circuit: | The circuit: | ||||
| * SD card attached to SPI bus as follows: | * SD card attached to SPI bus as follows: | ||||
| ** MOSI - pin 11 | |||||
| ** MOSI - pin 11, pin 7 on Teensy with audio board | |||||
| ** MISO - pin 12 | ** MISO - pin 12 | ||||
| ** CLK - pin 13 | |||||
| ** CS - pin 4 | |||||
| ** CLK - pin 13, pin 14 on Teensy with audio board | |||||
| ** CS - pin 4, pin 10 on Teensy with audio board | |||||
| created Nov 2010 | created Nov 2010 | ||||
| by David A. Mellis | by David A. Mellis | ||||
| void setup() | void setup() | ||||
| { | { | ||||
| //UNCOMMENT THESE TWO LINES FOR TEENSY AUDIO BOARD: | |||||
| //SPI.setMOSI(7); // Audio shield has MOSI on pin 7 | |||||
| //SPI.setSCK(14); // Audio shield has SCK on pin 14 | |||||
| // Open serial communications and wait for port to open: | // Open serial communications and wait for port to open: | ||||
| Serial.begin(9600); | Serial.begin(9600); | ||||
| while (!Serial) { | while (!Serial) { | 
| This example shows how to create and destroy an SD card file | This example shows how to create and destroy an SD card file | ||||
| The circuit: | The circuit: | ||||
| * SD card attached to SPI bus as follows: | * SD card attached to SPI bus as follows: | ||||
| ** MOSI - pin 11 | |||||
| ** MOSI - pin 11, pin 7 on Teensy with audio board | |||||
| ** MISO - pin 12 | ** MISO - pin 12 | ||||
| ** CLK - pin 13 | |||||
| ** CS - pin 4 | |||||
| ** CLK - pin 13, pin 14 on Teensy with audio board | |||||
| ** CS - pin 4, pin 10 on Teensy with audio board | |||||
| created Nov 2010 | created Nov 2010 | ||||
| by David A. Mellis | by David A. Mellis | ||||
| void setup() | void setup() | ||||
| { | { | ||||
| //UNCOMMENT THESE TWO LINES FOR TEENSY AUDIO BOARD: | |||||
| //SPI.setMOSI(7); // Audio shield has MOSI on pin 7 | |||||
| //SPI.setSCK(14); // Audio shield has SCK on pin 14 | |||||
| // Open serial communications and wait for port to open: | // Open serial communications and wait for port to open: | ||||
| Serial.begin(9600); | Serial.begin(9600); | ||||
| while (!Serial) { | while (!Serial) { |