Hi All
I'm trying to get the Audio Adaptor working with the built-in SD card on my Teensy 3.6. I'm trying with the example/code for tutorial "Part_1_04_Blink_While_Playing" and I've swapped the comments to define the CS pin as BUILTIN_SDCARD for SDIO.
The Setup function runs but the whole program stops somewhere after SD.begin() is called, but the setup function never completes and the loop function never runs.
This is my first project with a Teensy so I'm not that familiar with it but I've done my best to try and find out whats going wrong. If I remove all traces of the AudioPlaySdWav object then the code moves on to the loop as expected, I've tried adding some Serial.println()'s to the Audio library and I can see that the object is instantiated and begin() is called and completes on the AudioPlaySdWav object but as expected (loop isn't running) play() is never called.
I should mention that I've got the files for the tutorial on the SD card, and the SD library on it's own can read the card and list the files.
Any thoughts on what I can try next?
Regards
Ben
I'm trying to get the Audio Adaptor working with the built-in SD card on my Teensy 3.6. I'm trying with the example/code for tutorial "Part_1_04_Blink_While_Playing" and I've swapped the comments to define the CS pin as BUILTIN_SDCARD for SDIO.
The Setup function runs but the whole program stops somewhere after SD.begin() is called, but the setup function never completes and the loop function never runs.
Code:
void setup() {
Serial.begin(9600);
AudioMemory(8);
sgtl5000_1.enable();
sgtl5000_1.volume(0.45);
SPI.setMOSI(SDCARD_MOSI_PIN);
SPI.setSCK(SDCARD_SCK_PIN);
if (!(SD.begin(SDCARD_CS_PIN))) {
while (1) {
Serial.println("Unable to access the SD card");
delay(500);
}
}
pinMode(13, OUTPUT); // LED on pin 13
delay(1000);
Serial.println("Setup complete");
}
This is my first project with a Teensy so I'm not that familiar with it but I've done my best to try and find out whats going wrong. If I remove all traces of the AudioPlaySdWav object then the code moves on to the loop as expected, I've tried adding some Serial.println()'s to the Audio library and I can see that the object is instantiated and begin() is called and completes on the AudioPlaySdWav object but as expected (loop isn't running) play() is never called.
I should mention that I've got the files for the tutorial on the SD card, and the SD library on it's own can read the card and list the files.
Any thoughts on what I can try next?
Regards
Ben