https://forum.pjrc.com/threads/27409-Play-RAW-from-Serial-Flash?p=91876&viewfull=1#post91876main
//SPI.setSCK(14); // Audio shield has SCK on pin 14 | //SPI.setSCK(14); // Audio shield has SCK on pin 14 | ||||
//SPI.setMOSI(7); // Audio shield has MOSI on pin 7 | //SPI.setMOSI(7); // Audio shield has MOSI on pin 7 | ||||
//uncomment these if you have other SPI chips connected | |||||
//to keep them disabled while using only SerialFlash | |||||
//pinMode(4, INPUT_PULLUP); | |||||
//pinMode(10, INPUT_PULLUP); | |||||
// wait up to 10 seconds for Arduino Serial Monitor | // wait up to 10 seconds for Arduino Serial Monitor | ||||
unsigned long startMillis = millis(); | unsigned long startMillis = millis(); | ||||
while (!Serial && (millis() - startMillis < 10000)) ; | while (!Serial && (millis() - startMillis < 10000)) ; |
//SPI.setSCK(14); // Audio shield has SCK on pin 14 | //SPI.setSCK(14); // Audio shield has SCK on pin 14 | ||||
//SPI.setMOSI(7); // Audio shield has MOSI on pin 7 | //SPI.setMOSI(7); // Audio shield has MOSI on pin 7 | ||||
//uncomment these if you have other SPI chips connected | |||||
//to keep them disabled while using only SerialFlash | |||||
//pinMode(4, INPUT_PULLUP); | |||||
//pinMode(10, INPUT_PULLUP); | |||||
// wait up to 10 seconds for Arduino Serial Monitor | // wait up to 10 seconds for Arduino Serial Monitor | ||||
unsigned long startMillis = millis(); | unsigned long startMillis = millis(); | ||||
while (!Serial && (millis() - startMillis < 10000)) ; | while (!Serial && (millis() - startMillis < 10000)) ; |
//SPI.setSCK(14); // Audio shield has SCK on pin 14 | //SPI.setSCK(14); // Audio shield has SCK on pin 14 | ||||
//SPI.setMOSI(7); // Audio shield has MOSI on pin 7 | //SPI.setMOSI(7); // Audio shield has MOSI on pin 7 | ||||
//uncomment these if you have other SPI chips connected | |||||
//to keep them disabled while using only SerialFlash | |||||
//pinMode(4, INPUT_PULLUP); | |||||
//pinMode(10, INPUT_PULLUP); | |||||
// wait for Arduino Serial Monitor | // wait for Arduino Serial Monitor | ||||
while (!Serial) ; | while (!Serial) ; | ||||
delay(100); | delay(100); |
//SPI.setSCK(14); // Audio shield has SCK on pin 14 | //SPI.setSCK(14); // Audio shield has SCK on pin 14 | ||||
//SPI.setMOSI(7); // Audio shield has MOSI on pin 7 | //SPI.setMOSI(7); // Audio shield has MOSI on pin 7 | ||||
//uncomment these if you have other SPI chips connected | |||||
//to keep them disabled while using only SerialFlash | |||||
//pinMode(4, INPUT_PULLUP); | |||||
//pinMode(10, INPUT_PULLUP); | |||||
while (!Serial) ; | while (!Serial) ; | ||||
delay(100); | delay(100); | ||||