Teensy 3.6 and audio board

Status
Not open for further replies.
Hello,

I am using Teensy 3.6 and audio board. I am trying to run the Hardware testing program from the example programs.
I am able to get the values at the serial monitor but I am not able to hear the beeps
Could you help me out?

Thank you
 
What is connected where for producing the sound? Audio headphones in the jack? Safe to assume the Audio board is properly soldered to the T_3.6?
 
Teensy 3.6 is connected to laptop through usb. Part_1_02_Hardware_Test from the Audio examples of Teensyduino outputs continuous beeping sound, which was working earlier. Yes, audio headphones are connected to jack and the audio board is properly soldered.

This is the code:
#include <Audio.h>
#include <Wire.h>
#include <SD.h>
#include <SPI.h>
#include <SerialFlash.h>
#include <Bounce.h>

AudioSynthWaveform waveform1;
AudioOutputI2S i2s1;
AudioConnection patchCord1(waveform1, 0, i2s1, 0);
AudioConnection patchCord2(waveform1, 0, i2s1, 1);
AudioControlSGTL5000 sgtl5000_1;

Bounce button0 = Bounce(0, 15);
Bounce button1 = Bounce(1, 15);
Bounce button2 = Bounce(2, 15);

int count=1;
int a1history=0, a2history=0, a3history=0;

void setup() {
AudioMemory(10);
pinMode(0, INPUT_PULLUP);
pinMode(1, INPUT_PULLUP);
pinMode(2, INPUT_PULLUP);
Serial.begin(115200);
sgtl5000_1.enable();
sgtl5000_1.volume(0.3);
waveform1.begin(WAVEFORM_SINE);
delay(1000);
button0.update();
button1.update();
button2.update();
a1history = analogRead(A1);
a2history = analogRead(A2);
a3history = analogRead(A3);
}




void loop() {
Serial.print("Beep #");
Serial.println(count);
count = count + 1;
waveform1.frequency(440);
waveform1.amplitude(0.9);
wait(250);
waveform1.amplitude(0);
wait(1750);
}

void wait(unsigned int milliseconds)
{
elapsedMillis msec=0;

while (msec <= milliseconds) {
button0.update();
button1.update();
button2.update();
if (button0.fallingEdge()) Serial.println("Button (pin 0) Press");
if (button1.fallingEdge()) Serial.println("Button (pin 1) Press");
if (button2.fallingEdge()) Serial.println("Button (pin 2) Press");
if (button0.risingEdge()) Serial.println("Button (pin 0) Release");
if (button1.risingEdge()) Serial.println("Button (pin 1) Release");
if (button2.risingEdge()) Serial.println("Button (pin 2) Release");
int a1 = analogRead(A1);
int a2 = analogRead(A2);
int a3 = analogRead(A3);
if (a1 > a1history + 50 || a1 < a1history - 50) {
Serial.print("Knob (pin A1) = ");
Serial.println(a1);
a1history = a1;
}
if (a2 > a2history + 50 || a2 < a2history - 50) {
Serial.print("Knob (pin A2) = ");
Serial.println(a2);
a2history = a2;
}
if (a3 > a3history + 50 || a3 < a3history - 50) {
Serial.print("Knob (pin A3) = ");
Serial.println(a3);
a3history = a3;
}
}
}



Could you also tell me which pin from teensy 3.6 is responsible for sending audio to the headphone jack?
 
Could you also tell me which pin from teensy 3.6 is responsible for sending audio to the headphone jack?

If sketch was working before, I suspect loose wiring. Perhaps attach a photo of your wiring. Is the T3.6 LED lighted?

The Teensy I2S pins connect with the codec on the audio board, and the codec is actually driving the line out and headphones. (you can configure the audio output to go the the Teensy DAC pins with AudioOutputAnalogStereo)
 
Could you also tell me which pin from teensy 3.6 is responsible for sending audio to the headphone jack?

Pins 9, 11, 13, 18, 19, 22, 23 are used. GND and +3.3V are needed for power.

This and other info (like the schematic) can be found on the audio shield page:

https://www.pjrc.com/store/teensy3_audio.html

Technically speaking, Teensy 3.6 sends the audio data by I2S protocol to the SGTL5000 chip. That chip converts it from I2S digital format to the analog signals on the headphone jack.
 
Status
Not open for further replies.
Back
Top