Waveshield won't work, probably user error.

Adafruit Ethernet, Motor, Proto, Wave, Datalogger, GPS Shields - etc!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
winstonsmith84
 
Posts: 4
Joined: Mon Feb 03, 2014 11:06 pm

Waveshield won't work, probably user error.

Post by winstonsmith84 »

I apologize in advance. I have zero electrical experience outside of a basic general electrical engineering course I had ten years ago. I’m trying to build the voice changer, the add made this look like something I could handle, but alas I’ve messed it up somehow and can’t even get the wave shield tutorial to work.
-How do I load the files onto the SD card? One at a time, or the entire “pi” folder? I’ve tried both.
-When checking to make sure the audio format is compatible (the walkthrough tells me to do this), the file doesn’t have a “summary’ tab, only a general. I proceeded assuming the Pi number files you have on your website/walkthrough would be compatible.
-copy and pasted sketch from “pi party” on the wave shield walkthrough
-copy and pasted sketch from the adafruit wavehc library
-saved newest WaveHC library to my Arduino program and uploaded the sketches from “PiSpeakHC,” “SampleRateHC,” “PiSpeakHC,” and “SdReadTest.” One at a time, all at once, with and without using the reset button, etc.
-the files play off of the sd card on a normal computer, I just can’t get the wave shield to say anything.
The lights are on when I have the Arduino plugged in, and the earphones I have plugged in sound like they would when plugged into any other music listening device not playing any music. The volume knob does nothing. It gets warm after a while, so I assume electricity is moving through it. Not sure what I’m doing wrong here, any help is greatly appreciated.

User avatar
Franklin97355
 
Posts: 23911
Joined: Mon Apr 21, 2008 2:33 pm

Re: Waveshield won't work, probably user error.

Post by Franklin97355 »

Start here https://learn.adafruit.com/adafruit-wav ... or-arduino and get the shield working before trying anything else. If you are still having problems after trying this let us know. Don't forget the jumper wires and post clear pictures of the shield from both sides if you can.

winstonsmith84
 
Posts: 4
Joined: Mon Feb 03, 2014 11:06 pm

Re: Waveshield won't work, probably user error.

Post by winstonsmith84 »

Franklin97355,
That is the walk through I am currently trying to work through. At the bottom of the walkthrough is a “Pi Party” section I am trying to get to work. I am lacking a camera at the moment, so assuming it isn’t my lack of soldering ability, which is probably the culprit, what are some other reasons I might not be able to get this to work? I’ve loaded the number sound files on the SD card, and played them off of the correctly formatted SD card, so I don’t think it’s that. I’ve copied and pasted every version of the library and loaded it onto the Arduino. Am I supposed to alter the sketch at all? Nothing seems to work.
Thank you very much for any help you can give. I appreciate your time.

User avatar
Franklin97355
 
Posts: 23911
Joined: Mon Apr 21, 2008 2:33 pm

Re: Waveshield won't work, probably user error.

Post by Franklin97355 »

Don't forget the jumper wires and post clear pictures of the shield from both sides. What is not working in the sketch? Any errors when you compile?

winstonsmith84
 
Posts: 4
Joined: Mon Feb 03, 2014 11:06 pm

Re: Waveshield won't work, probably user error.

Post by winstonsmith84 »

Below is what I upload from the sketch. Thank you for your time.

Code: Select all

/*
 * Text-to-speech example to speak the first n digits of pi.
 * The number is stored in flash, each digit is spoken one at a time.
 */
#include <WaveHC.h>
#include <WaveUtil.h>

// put pi in flash memory
const char pi[] PROGMEM = "3.1415926535897932384626433832795028841971693993751058209749";

SdReader card;    // This object holds the information for the card
FatVolume vol;    // This holds the information for the partition on the card
FatReader root;   // This holds the information for the volumes root directory
FatReader file;   // This object represent the WAV file for a pi digit or period
WaveHC wave;      // This is the only wave (audio) object, since we will only play one at a time
/*
 * Define macro to put error messages in flash memory
 */
#define error(msg) error_P(PSTR(msg))

//////////////////////////////////// SETUP

void setup() {
  // set up Serial library at 9600 bps
  Serial.begin(9600);           
  
  PgmPrintln("Pi speaker");
  
  if (!card.init()) {
    error("Card init. failed!");
  }
  if (!vol.init(card)) {
    error("No partition!");
  }
  if (!root.openRoot(vol)) {
    error("Couldn't open dir");
  }

  PgmPrintln("Files found:");
  root.ls();
}

/////////////////////////////////// LOOP

unsigned digit = 0;

void loop() { 
  // get next character from flash memory
  char c = pgm_read_byte(&pi[digit++]);
   
  if (c == 0) {
    digit = 0;
    Serial.println();
    return;
  }
  Serial.write(c);
    
  speaknum(c);
   
  delay(10);
}

/////////////////////////////////// HELPERS

char filename[13];
void speaknum(char c) {
  uint8_t i=0;
  
  // copy flash string for 'period' to filename
  strcpy_P(filename, PSTR("P.WAV"));
  
  if ('0' <= c && c <= '9') {
    // digit - change 'P' to digit
    filename[0] = c;
    i = 1;
  } 
  else if (c != '.') {
    // error if not period
    return;
  }
  playcomplete(filename);
}
/*
 * print error message and halt
 */
void error_P(const char *str) {
  PgmPrint("Error: ");
  SerialPrint_P(str);
  sdErrorCheck();
  while(1);
}
/*
 * print error message and halt if SD I/O error
 */
void sdErrorCheck(void) {
  if (!card.errorCode()) return;
  PgmPrint("\r\nSD I/O error: ");
  Serial.print(card.errorCode(), HEX);
  PgmPrint(", ");
  Serial.println(card.errorData(), HEX);
  while(1);
}
/*
 * Play a file and wait for it to complete
 */
void playcomplete(char *name) {
  playfile(name);
  while (wave.isplaying);
  
  // see if an error occurred while playing
  sdErrorCheck();
}
/*
 * Open and start playing a WAV file
 */
void playfile(char *name) {
  if (wave.isplaying) {// already playing something, so stop it!
    wave.stop(); // stop it
  }
  if (!file.open(root, name)) {
    PgmPrint("Couldn't open file ");
    Serial.print(name); 
    return;
  }
  if (!wave.create(file)) {
    PgmPrintln("Not a valid WAV");
    return;
  }
  // ok time to play!
  wave.play();
}
Attachments
connected1.JPG
connected1.JPG (88.25 KiB) Viewed 464 times
back.JPG
back.JPG (108.83 KiB) Viewed 464 times
front.JPG
front.JPG (122.98 KiB) Viewed 464 times
Last edited by Franklin97355 on Tue Aug 19, 2014 7:04 pm, edited 1 time in total.
Reason: Added [code] tags

winstonsmith84
 
Posts: 4
Joined: Mon Feb 03, 2014 11:06 pm

Re: Waveshield won't work, probably user error.

Post by winstonsmith84 »

Any suggestions, or am I beyond help on this one :)

User avatar
pburgess
 
Posts: 4161
Joined: Sun Oct 26, 2008 2:29 am

Re: Waveshield won't work, probably user error.

Post by pburgess »

Two problems I can see:

1. The level-shifter chip is installed backwards; needs to be de-soldered and turned the other way.

2. There are a LOT of cold solder joints. The ground pins and pin 11 are especially worrisome. You'll want to re-heat most of the joints, getting the solder to flow smoothly between the pin and copper pad. This guide has some pointers:
https://learn.adafruit.com/adafruit-gui ... -soldering

Good news is that your SD card connections look pretty decent. That's normally one of the biggest problem spots.

User avatar
oatthawut
 
Posts: 1
Joined: Thu Aug 09, 2018 4:40 am

Re: Waveshield won't work, probably user error.

Post by oatthawut »

[img]Hi , I run into problems running programs do not pass.
Usually I can run the program through.
Please help me.
present.
MAX31856 + Node MCU ESP8266
SCK = D6
SDO = D4
SDI = D3
CS = D2
Attachments
capture-20180809-154336.png
capture-20180809-154336.png (316.31 KiB) Viewed 169 times
capture-20180809-153816.png
capture-20180809-153816.png (51.65 KiB) Viewed 169 times

User avatar
danhalbert
 
Posts: 4652
Joined: Tue Aug 08, 2017 12:37 pm

Re: Waveshield won't work, probably user error.

Post by danhalbert »

@oatthawut, please start a new thread for your issues.

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino Shields from Adafruit”