AudioControlSGTL5000 problem

Status
Not open for further replies.

EladAssia

New member
Hi all :)

I started today to use teensy with audio shield and I went through the workshop pdf and video.
I didn't connect the buttons and all as in the workshop but connected only the teensy to the audio shield.
I came across a problem pretty early and I don't know what to do...
I tried several audio tutorials and none of them played any sound :(. I tried the "blink_while_playing" tutorial to see whether I have problem with the connection between the teensy and the audio shield but there were no blinks.
I went line by line in the code to figure out where is the problematic line and I found out that the code does nothing after "using" the AudioControlSGTL5000 variable in the setup.
This is the code:
Code:
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>

AudioPlaySdWav           playSdWav1;
AudioOutputI2S           audioOutput;
AudioConnection          patchCord1(playSdWav1, 0, audioOutput, 0);
AudioConnection          patchCord2(playSdWav1, 1, audioOutput, 1);
AudioControlSGTL5000     sgtl5000_1;

void setup() {
  Serial.begin(9600);
  delay(500);
  Serial.println("Hello");
  delay(500);
  Serial.println("World");
  delay(500);
  AudioMemory(8);
  Serial.println("Hello");
  delay(500);
  sgtl5000_1.enable();
  Serial.println("World");
  delay(500);
  sgtl5000_1.volume(0.45);
  SPI.setMOSI(7);
  SPI.setSCK(14);
  if (!(SD.begin(10))) {
    while (1) {
      Serial.println("Unable to access the SD card");
      delay(500);
    }
  }
  pinMode(13, OUTPUT); // LED on pin 13
  delay(1000);
}

void loop() {
  if (playSdWav1.isPlaying() == false) {
    Serial.println("Start playing");
    playSdWav1.play("SDTEST3.WAV");
    delay(10); // wait for library to parse WAV info
  }

  // print the play time offset
  Serial.print("Playing, now at ");
  Serial.print(playSdWav1.positionMillis());
  Serial.println(" ms");

  // blink LED and print info while playing
  digitalWrite(13, HIGH);
  delay(250);
  digitalWrite(13, LOW);
  delay(250);

  // read the knob position (analog input A2)
  /*
  int knob = analogRead(A2);
  float vol = (float)knob / 1280.0;
  sgtl5000_1.volume(vol);
  Serial.print("volume = ");
  Serial.println(vol);
  */
}

And this is the output:
Code:
Hello
World
Hello

Do you know what seems to be the problem?

Thanks,
Elad
 
IMG_7748.JPGIMG_7749.JPGIMG_7750.JPGIMG_7751.JPGIMG_7752.JPG

The audio shield is sitting over the teensy and they are connected through pins-socket (I checked with a multimeter and there is a connection between the start and ending of the socket).

Thanks,
Elad
 
Everything I can see in these photos looks good.

Are the pins actually soldered on the Teensy? That part is hidden from view...
 
Similar Issue

Everything I can see in these photos looks good.

Are the pins actually soldered on the Teensy? That part is hidden from view...

I am having a similar issue, everything is soldered, I have the SDTEST files on the SD card. I am able to play the .WAV files if I use the WavFilePlayer sketch. This sketch utilizes a while loop to wait for the song to complete. but the Blink while playing sketch does not work.

Soldered the audio shield to the teensy, connections are good.

If I take out the while loop the song plays the first half second then starts over.

using REVD of the audio board and a 4.0.

Thank you for any help you can provide!
 
Status
Not open for further replies.
Back
Top