snowskijunky
Active member
I just purchased a new prop shield and teensy 3.5. Both are wired up as seen in the pictures linked below. DAC on the prop is connected to DA0. The only pin not connected is A17 because the pads came off... according to everything I read on this website that shouldn't be used by the prop shield anyway.
Right now, I'm trying to run the following code to play the SD test 1 file from the example given on here.
I am getting a slight buzz from the speaker as though it is on, but no pop and no sound.
I've successfully run the SD check test which shows the file on the card, tried two differend SD's (a no name 1gb and 16gb sandisk), I've tested it with two known working speakers, and I've succesfully calibrated and used the motion sensors and simulated it using the processing visualizer. I haven't tested the LED drivers yet. I'm just powering it with computer usb, which has worked in the past. I did a clean install of arduino 1.8.6 and teensy duino (whatever the latest is) plus libraries.
I'm not sure what I'm doing wrong here. I've had this working before. If someone could please provide a second set of eyes, I would greatly appreciate it.
Thank you!
PICTURES: https://imgur.com/a/FTYlZmF
Right now, I'm trying to run the following code to play the SD test 1 file from the example given on here.
Code:
/////////////////////////////////////////////////////////////////////////////
//////////////////////////LIBRARIES AND VARIABLES////////////////////////////
/////////////////////////////////////////////////////////////////////////////
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>
const int ledPin = 13;
// GUItool: begin automatically generated code
AudioPlaySdWav playSdWav1; //xy=107,61
AudioPlaySdWav playSdWav2; //xy=108,126
AudioMixer4 mixer1; //xy=429,117
AudioOutputAnalog dac1; //xy=766,61
AudioConnection patchCord1(playSdWav1, 0, mixer1, 0);
AudioConnection patchCord2(playSdWav1, 1, mixer1, 1);
AudioConnection patchCord3(playSdWav2, 0, mixer1, 2);
AudioConnection patchCord4(playSdWav2, 1, mixer1, 3);
AudioConnection patchCord5(mixer1, dac1);
// GUItool: end automatically generated code
/////////////////////////////////////////////////////////////////////////////
////////////////////////////////SDCARD SETUP/////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// Use these with the Teensy Audio Shield
//#define SDCARD_CS_PIN 10
//#define SDCARD_MOSI_PIN 7
//#define SDCARD_SCK_PIN 14
// Use these with the Teensy 3.5 & 3.6 SD card
#define SDCARD_CS_PIN BUILTIN_SDCARD
#define SDCARD_MOSI_PIN 11 // not actually used
#define SDCARD_SCK_PIN 13 // not actually used
// Use these for the SD+Wiz820 or other adaptors
//#define SDCARD_CS_PIN 4
//#define SDCARD_MOSI_PIN 11
//#define SDCARD_SCK_PIN 13
/////////////////////////////////////////////////////////////////////////////
///////////////////////////////////SETUP/////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
void setup()
{
Serial.begin(9600); //initialize serial communication
AudioMemory(20); //set memory allocated to audio functions
dac1.analogReference(EXTERNAL); //much louder!
mixer1.gain(0, 1);
mixer1.gain(1, 1);
mixer1.gain(2, 1);
mixer1.gain(3, 1);
delay(50); //time for DAC voltage stabilization
pinMode(5, OUTPUT);
digitalWrite(5, HIGH); // turn on the amplifier
delay(10);
SPI.setMOSI(SDCARD_MOSI_PIN); //set SD card MOSI pin
SPI.setSCK(SDCARD_SCK_PIN); //set SD card clock pin
pinMode(ledPin, OUTPUT); //board indicator LED
}
/////////////////////////////////////////////////////////////////////////////
////////////////////////////////////LOOP/////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
void loop()
{
if(playSdWav1.isPlaying()==false)
{
playSdWav1.play("SDTEST1.WAV");
digitalWrite(ledPin, HIGH);
}
}
I am getting a slight buzz from the speaker as though it is on, but no pop and no sound.
I've successfully run the SD check test which shows the file on the card, tried two differend SD's (a no name 1gb and 16gb sandisk), I've tested it with two known working speakers, and I've succesfully calibrated and used the motion sensors and simulated it using the processing visualizer. I haven't tested the LED drivers yet. I'm just powering it with computer usb, which has worked in the past. I did a clean install of arduino 1.8.6 and teensy duino (whatever the latest is) plus libraries.
I'm not sure what I'm doing wrong here. I've had this working before. If someone could please provide a second set of eyes, I would greatly appreciate it.
Thank you!
PICTURES: https://imgur.com/a/FTYlZmF