// Teensy 3.2 to stream audio from I2S and analog channel to USB
// Test microphones are connected to Audio Board mic input and A2
// Using Audacity to record data
//*********************************************************************************** INIT
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>
// GUItool: begin automatically generated code
AudioInputAnalog adc1; //xy=218,294
AudioInputI2S i2s1; //xy=218,337
AudioOutputUSB usb1; //xy=422,311
AudioConnection patchCord1(adc1, 0, usb1, 0);
AudioConnection patchCord2(i2s1, 0, usb1, 1);
AudioControlSGTL5000 sgtl5000_1; //xy=226,408
// GUItool: end automatically generated code
//*********************************************************************************** SETUP
void setup() {
AudioMemory(12);
sgtl5000_1.enable();
sgtl5000_1.volume(0.5);
sgtl5000_1.inputSelect(AUDIO_INPUT_MIC);
sgtl5000_1.micGain(36);
delay(1000);
}
//*********************************************************************************** LOOP
void loop() {
}