CopyFromSD should use a different CS with Audio Board (shield)

Blitter

Member
In the SerialFlash library, the CopyFromSD example contains this:

Code:
const int SDchipSelect = 4;
const int FlashChipSelect = 6;

void setup()
  // uncomment these if using Teensy audio shield
  // SPI.setSCK(14);  // Audio shield has SCK on pin 14
  // SPI.setMOSI(7);  // Audio shield has MOSI on pin 7

When uncommented, and used with the Audio Board (shield), the SDChipSelect pin should be 10, and not 4.

Suggestion: Add a comment to notify the audio board users:
Code:
const int SDchipSelect = 4; // Audio Shield has SD card CS on pin 10
const int FlashChipSelect = 6;

void setup()
  // uncomment these if using Teensy audio shield
  // SPI.setSCK(14);  // Audio shield has SCK on pin 14
  // SPI.setMOSI(7);  // Audio shield has MOSI on pin 7
 
Back
Top