Teensy 3.6 + SPW2430

Status
Not open for further replies.

inasteen

New member
Hi all,

I have successfully used the audio shield to get audio from 2 SPW2430 (https://www.adafruit.com/product/2716) MEMS microphones to play through the headphone output. Thank you to Chip Audette's Teensy hearing aid project for that!

I want to connect 2 additional SPW2430s using the ADC on the Teensy. I have the DC output of the SPW2430 connected directly to the Teensy ADC pin, as is suggested on the adafruit page. However, I am just getting full scale white noise out of the headphones. Here's the code:

Code:
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>

AudioControlSGTL5000     sgtl5000_1;    //controller for the Teensy Audio Board
AudioInputI2S            i2s1;          //Stereo.  Digital audio from the Teensy Audio Board ADC
AudioInputAnalogStereo   adc12(A14, A15);
AudioOutputI2S           i2s2;          //Stereo.  Digital audio to the Teensy Audio Board DAC
AudioMixer4              mixer;
AudioConnection          patchCord1(i2s1, 0, mixer, 0);  //connect the Left input to the Left gain processor
AudioConnection          patchCord2(i2s1, 1, mixer, 1);  //connect the Right input to the Left gain processor
AudioConnection          patchCord3(adc12, 0, mixer, 2);  //connect the Right input to the Left gain processor
AudioConnection          patchCord4(adc12, 1, mixer, 3);  //connect the Right input to the Left gain processor
AudioConnection          patchCord10(mixer, 0, i2s2, 0); //connect the Left gain processor to the Left output
AudioConnection          patchCord11(mixer, 0, i2s2, 1); //connect the Right gain processor to the Right output

const int myInput = AUDIO_INPUT_LINEIN;

void setup()
{
    Serial.begin(115200);
    delay(500);

    AudioMemory(70);

    sgtl5000_1.enable();
    sgtl5000_1.inputSelect(myInput);
    sgtl5000_1.volume(0.8);
    sgtl5000_1.lineInLevel(10, 10);
    sgtl5000_1.adcHighPassFilterDisable();  //reduce noise.  https://forum.pjrc.com/threads/27215-24-bit-audio-boards?p=78831&viewfull=1#post78831

    //setup gains
    mixer.gain(0, 0.0f);
    mixer.gain(1, 0.0f);
    mixer.gain(2, 1.0f);
    mixer.gain(3, 1.0f);
}


void loop()
{
}

Am I doing something stupid here? Thank you for any suggestions.
 
Status
Not open for further replies.
Back
Top