Thanks Steve, very helpful tips. I have a teensy 3.1 project building outside of Arduino with the 3.0 makefile edited for the 3.1's arm. Things seem to be compiling and working fine.
Originally Posted by SteveS
Where i'm running into a snag is in trying to integrate the Audio Library and using the Audio Shield. I can compile and upload the PassThrough project in Arduino and audio passes just fine. However when I compile it using the c++ compiler / makefile outside of arduino … no audio. I'm calling all of the same functions as the arduino project. Maybe I'm missing something in the initialization?
Any help is greatly appreciated! Here's my C code.
AudioInputI2S audioInput; // audio shield: mic or line-in
AudioOutputI2S audioOutput; // audio shield: headphones & line-out
// Create Audio connections between the components
AudioConnection c1(audioInput, 0, audioOutput, 0);
AudioConnection c2(audioInput, 1, audioOutput, 1);
extern "C" int main(void)
int blinkrate = 0;
// every 50 ms, adjust the volume & blink rate
if (volmsec > 50)
float vol = analogRead(15);
vol = vol / 10.24;
volmsec = 0;
blinkrate = analogRead(17);
AudioMemory(12); //allocate memory for audio buffer
// Enable the audio shield and set the output volume.