Can't get sound from propshield lc

Status
Not open for further replies.

Peter2708

Member
Using Teensy 3.2 and propshiled lc, just trying to send some noise to a 4 ohm 3 watt speaker as a hardware test.
I can hear the speaker click once the code is uploaded, but no noise signal thereafter.

Here is the code:

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

// GUItool: begin automatically generated code
AudioSynthNoiseWhite noise1; //xy=346,213
AudioOutputAnalog dac1; //xy=480,212
AudioConnection patchCord1(noise1, dac1);

// GUItool: end automatically generated code
void setup(){
pinMode(5, OUTPUT);
digitalWrite(5, HIGH); // turn on the amplifier
delay(10); // allow time to wake up
}


void loop() {
// put your main code here, to run repeatedly:

}

Any pointers?
 
You're not giving the audio library any memory, so it can't do anything. Open any of the examples from File > Examples > Audio to see how AudioMemory() is used in setup.

Also make sure you've got the DAC pin connected. It's not one of the 28 outside pins, so it's easy to overlook.
 
I ran a similar script where I added audio memory, and tried the sweep example editted to include:

AudioOutputAnalog dac1; //xy=480,212
AudioConnection patchCord1(noise1, dac1);

Still got the same result.
 
You need to post the complete program you tried. We can't help you figure out what's wrong with so little info. There's almost certainly some small detail not quite right, but nobody can know what it is.

The way to get help here is to post a message where anyone reading can copy & paste your code into Arduino and run it on their board.
 
I added the AudioMemory() and noise1.amplitude() to your sketch above and i get white noise out the speaker ...
Code:
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>

// GUItool: begin automatically generated code
AudioSynthNoiseWhite noise1; //xy=346,213
AudioOutputAnalog dac1; //xy=480,212
AudioConnection patchCord1(noise1, dac1);

// GUItool: end automatically generated code
void setup() {
  pinMode(5, OUTPUT);
  digitalWrite(5, HIGH); // turn on the amplifier
  AudioMemory(12);
  noise1.amplitude(0.5);
  delay(10); // allow time to wake up
}


void loop() {
  // put your main code here, to run repeatedly:

}

you need to jumper teensy DAC/A14 to the AudioIn on the shield.
 
Last edited:
I added the AudioMemory() and noise1.amplitude() to your sketch above and i get white noise out the speaker ...
Code:
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>

// GUItool: begin automatically generated code
AudioSynthNoiseWhite noise1; //xy=346,213
AudioOutputAnalog dac1; //xy=480,212
AudioConnection patchCord1(noise1, dac1);

// GUItool: end automatically generated code
void setup(){
pinMode(5, OUTPUT);
digitalWrite(5, HIGH); // turn on the amplifier
AudioMemory(12);
noise1.amplitude(0.5);
delay(10); // allow time to wake up
}


void loop() {
// put your main code here, to run repeatedly:

}

you need to jumper teensy DAC/A14 to the AudioIn on the shield.

Still nothing.
DAC/A14 to the Audio in on the shield.... ?? I am using the propshield LC, not the audio shield. Are we on the same page?
 
Still nothing.
DAC/A14 to the Audio in on the shield.... ?? I am using the propshield LC, not the audio shield. Are we on the same page?

Yes, look at the shield PCB illustration https://www.pjrc.com/store/prop_shield.html
There is a an AudioIN hole just inside of pin 13 (not an edge pin). The teensy DAC pin needs to be jumpered to that. When the propshield is mounted on the T3.2, the AudioIN hole is above the DAC/A14 hole

propshield_pinout.png
 
Last edited:
Status
Not open for further replies.
Back
Top