Hello,
I am very new to the Teensy, so I have been working my way through the Audio tutorial workshop:
https://hackaday.io/project/8292-microcontroller-audio-workshop-had-supercon-2015
I have been able to complete the Section 1 of the tutorial. Here is a picture of my set-up:
Teensy 4.1 with Rev D audio shield
*Note: All connections to the audio shield are soldered.
However, after much trial-and-error, I cannot get the LED to blink while playing music, steps 1-4 and 1-5. I traced the issue in the source code and found that the line...
pinMode(13, OUTPUT)
... is causing the issue. If I comment out this line of code and run the program, I hear the music and all other concurrent functions (ie. printing to process monitor, delays, etc.) work as expected.
After figuring this out I put a new number into the pinMode() method (ie. pinMode(2, OUTPUT)), and the program ran as expected.
Finally, I put in the original code and found where there program is crashing:
void loop() {
if (playSdWav1.isPlaying() == false) {
Serial.println("Start playing");
playSdWav1.play("SDTEST3.WAV");
Serial.println("test");
delay(10); // wait for library to parse WAV info
}
The added println statement (Serial.println("test")) will not be executed. Therefore, I'm assuming that the line playSdWav1.play("SDTEST3.WAV") is what is causing the program not to work. Other than this println statement, I have not modified the code in any way. Additionally, I don't think there is anything wrong with my LED because I can ran the example blink testing program without issue.
I am very new to the Teensy, so I have been working my way through the Audio tutorial workshop:
https://hackaday.io/project/8292-microcontroller-audio-workshop-had-supercon-2015
I have been able to complete the Section 1 of the tutorial. Here is a picture of my set-up:
Teensy 4.1 with Rev D audio shield
*Note: All connections to the audio shield are soldered.
However, after much trial-and-error, I cannot get the LED to blink while playing music, steps 1-4 and 1-5. I traced the issue in the source code and found that the line...
pinMode(13, OUTPUT)
... is causing the issue. If I comment out this line of code and run the program, I hear the music and all other concurrent functions (ie. printing to process monitor, delays, etc.) work as expected.
After figuring this out I put a new number into the pinMode() method (ie. pinMode(2, OUTPUT)), and the program ran as expected.
Finally, I put in the original code and found where there program is crashing:
void loop() {
if (playSdWav1.isPlaying() == false) {
Serial.println("Start playing");
playSdWav1.play("SDTEST3.WAV");
Serial.println("test");
delay(10); // wait for library to parse WAV info
}
The added println statement (Serial.println("test")) will not be executed. Therefore, I'm assuming that the line playSdWav1.play("SDTEST3.WAV") is what is causing the program not to work. Other than this println statement, I have not modified the code in any way. Additionally, I don't think there is anything wrong with my LED because I can ran the example blink testing program without issue.