zurielseven
Member
I just want an exceptionally simple WAV player, however, neither the sample files for the sample wav player nor the file I have created seem to be accessible on any of 3 cards I have purchased, formatted, and swapped out. Can someone do me a huge favor and simply spot-check my code - its late, perhaps I missed something?
View attachment BINARY.zip
Code:
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>
// GUItool: begin automatically generated code
AudioPlaySdWav playSdWav1; //xy=433,239
AudioOutputI2S i2s1; //xy=602,239
AudioConnection patchCord1(playSdWav1, 0, i2s1, 0);
AudioConnection patchCord2(playSdWav1, 1, i2s1, 1);
AudioControlSGTL5000 sgtl5000_1; //xy=421,139
// GUItool: end automatically generated code
int flag;
void setup() {
// put your setup code here, to run once:
flag=0;
AudioMemory(10);
}
void loop() {
// put your main code here, to run repeatedly:
Serial.println(playSdWav1.isPlaying());
if (flag==0) {
playSdWav1.play("BINARY.WAV");
flag++;
}
}
View attachment BINARY.zip