Parcourir la source

more teensy audio board settings

Adds more comments on how to use sd on teensy audio board
main
Frank Bösing il y a 8 ans
Parent
révision
039b7ed20d
6 fichiers modifiés avec 40 ajouts et 18 suppressions
  1. +6
    -3
      examples/CardInfo/CardInfo.ino
  2. +7
    -3
      examples/Datalogger/Datalogger.ino
  3. +6
    -3
      examples/DumpFile/DumpFile.ino
  4. +7
    -3
      examples/Files/Files.ino
  5. +7
    -3
      examples/ReadWrite/ReadWrite.ino
  6. +7
    -3
      examples/listfiles/listfiles.ino

+ 6
- 3
examples/CardInfo/CardInfo.ino Voir le fichier

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) {

+ 7
- 3
examples/Datalogger/Datalogger.ino Voir le fichier

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) {

+ 6
- 3
examples/DumpFile/DumpFile.ino Voir le fichier

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) {

+ 7
- 3
examples/Files/Files.ino Voir le fichier

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) {

+ 7
- 3
examples/ReadWrite/ReadWrite.ino Voir le fichier

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) {

+ 7
- 3
examples/listfiles/listfiles.ino Voir le fichier

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) {

Chargement…
Annuler
Enregistrer