Got the LC today, tried running the same audio code on it that I was running yesterday on a 3.2.
Here's the snippet, which compiles and runs (blinks LED at expected rate) from the latest teensyduino:
Uncommenting the AudioOutputAnalog results in...nothing? It doesn't blink and the scope shows DC ground on the DAC output. Copying the DAC output code from the Teensy 3.2 home page works just fine, outputting a nice sine wave (nicer actually than the audio output wave from the 3.2). I see code #ifdef'd for the KL26Z, but it doesn't work.
Is DAC audio output expected to work on the Teensy LC? If not, no sweat... I just don't want to start debugging something that isn't supported, or start writing my own output if there's a simple fix.
Here's the snippet, which compiles and runs (blinks LED at expected rate) from the latest teensyduino:
Code:
#include <Audio.h>
// GUItool: begin automatically generated code
AudioSynthWaveformSine sine1; //xy=362,371
//AudioOutputAnalog dac1; //xy=744,375
//AudioConnection patchCord1(sine1, dac1);
// GUItool: end automatically generated code
const int ledPin = 13;
void setup() {
pinMode(ledPin, OUTPUT);
AudioMemory(2);
sine1.amplitude(1.0f);
sine1.frequency(440);
}
void loop() {
digitalWrite(ledPin, HIGH); // set the LED on
delay(100);
digitalWrite(ledPin, LOW); // set the LED off
delay(500);
}
Uncommenting the AudioOutputAnalog results in...nothing? It doesn't blink and the scope shows DC ground on the DAC output. Copying the DAC output code from the Teensy 3.2 home page works just fine, outputting a nice sine wave (nicer actually than the audio output wave from the 3.2). I see code #ifdef'd for the KL26Z, but it doesn't work.
Is DAC audio output expected to work on the Teensy LC? If not, no sweat... I just don't want to start debugging something that isn't supported, or start writing my own output if there's a simple fix.