Go Down

Topic: Arduino library for WTV020-SD-16P audio module (Read 182562 times) previous topic - next topic

Caladonis

These little modules still are a great value and I find the very best way to get them working is get it to the bare minimums in stand alone mode without the arduino. If it wont play in stand alone, it wont work with the arduino. You only must have +3.3v, gnd, speaker and a ground point to use on the play (pin 9) and next/previous (pins 12 and 13). I'm not saying how long I worked because the SD card gets tight before it actually locks in place  :-[ 


My question is has anyone used two of these modules and being controlled by one arduino? I really don't want to go to a wav trigger card just so I can have two independent channels, one for background music/ ambiance sounds and one for triggered events/effects. Two of these with SD cards are still a fraction of the cost of a wav trigger that is overkill for my application.


Domino60

The WTV020-SD-16P audio module it's waste of money, you need a lot of work to do making it work.
To be or not to be? Read a book and you will see.

Goldenshuttle

The WTV020-SD-16P audio module it's waste of money, you need a lot of work to do making it work.
I tend to agree with you. Wasted so much valuable time.
why they did not make it mp3.
who wants to waste time on AD4 and software and all this stuff?
waste of time and money..add 1$ extra and move to new modules..just to name:
LMD102
JQ6500
Live to learn & make

Amator90

I finally got this module work. Now I have another issue to solve. Could you please give me a hint how to play specific file? For example:
If condition X
then play song 0012.ad4

Thanks for any advice.

Tomasina

I finally got this module work. Now I have another issue to solve. Could you please give me a hint how to play specific file? For example:
If condition X
then play song 0012.ad4
wtv020sd16p.playVoice(11);

lalufendy

WTV020-SD-16P audio module:



This is my first contribution for the Arduino community. With this library you will be able to play wav or ad4 files easily. Will be adding new method or features in the future. Built this cause I need it for my Arduino project.

Code: [Select]
/*
 Example: Control a WTV020-SD-16P module to play voices from an Arduino board.
 Created by Diego J. Arevalo, August 6th, 2012.
 Released into the public domain.
 */

#include <Wtv020sd16p.h>

int resetPin = 2;  // The pin number of the reset pin.
int clockPin = 3;  // The pin number of the clock pin.
int dataPin = 4;  // The pin number of the data pin.
int busyPin = 5;  // The pin number of the busy pin.

/*
Create an instance of the Wtv020sd16p class.
 1st parameter: Reset pin number.
 2nd parameter: Clock pin number.
 3rd parameter: Data pin number.
 4th parameter: Busy pin number.
 */
Wtv020sd16p wtv020sd16p(resetPin,clockPin,dataPin,busyPin);

void setup() {
  //Initializes the module.
  wtv020sd16p.reset();
}

void loop() {
  //Plays synchronously an audio file. Busy pin is used for this method.
  wtv020sd16p.playVoice(0);
  //Plays asynchronously an audio file.
  wtv020sd16p.asyncPlayVoice(1);
  //Plays audio file number 1 during 2 seconds.
  delay(5000);
  //Pauses audio file number 1 during 2 seconds. 
  wtv020sd16p.pauseVoice();
  delay(5000);
  //Resumes audio file number 1 during 2 seconds.
  wtv020sd16p.pauseVoice();
  delay(5000); 
  //Stops current audio file playing.
  wtv020sd16p.stopVoice();
  //Plays synchronously an audio file. Busy pin is used for this method. 
  wtv020sd16p.asyncPlayVoice(2);
  delay(2000);   
  //Mutes audio file number 2 during 2 seconds.
  wtv020sd16p.mute();
  delay(2000);
  //Unmutes audio file number 2 during 2 seconds.
  wtv020sd16p.unmute();
  delay(2000);   
  //Stops current audio file playing.
  wtv020sd16p.stopVoice();
}


Unzip Wtv020sd16p.zip and copy Its content into the Arduino library IDE folder. If you have any question or request, please don't hesitate in contact me.

Update: August 6th.
Added pause, stop, mute and unmute method as well updated the example program. Hope this helps.
i am sorry, i am no expert speak english..
i have a question..

i want to handle file music(ad4) in wtv020 modul,,,,
my plan i want use capacitive sensor in arduino for playing music in wtv020...

can u help me..
example : if i touch sensor capacitive then song (001) is play...

katonafull

#291
Jan 26, 2016, 07:31 am Last Edit: Feb 02, 2016, 10:17 pm by katonafull
The library or something isn't work aright for me with the WTV020-SD-16P audio module.
If i use this simple code and I use delay before the playing... the song starts playing, but after some seconds (1-2) it will restart:
But it does not have to be so.
I tried this with an other module too. The result is the same.

Code: [Select]
/*
Example: Control a WTV020-SD-16P module to play voices from an Arduino board.
Created by Diego J. Arevalo, August 6th, 2012.
Released into the public domain.
*/

#include <Wtv020sd16p.h>

int resetPin = 2;  // The pin number of the reset pin.
int clockPin = 3;  // The pin number of the clock pin.
int dataPin = 4;  // The pin number of the data pin.
int busyPin = 5;  // The pin number of the busy pin.

/*
Create an instance of the Wtv020sd16p class.
1st parameter: Reset pin number.
2nd parameter: Clock pin number.
3rd parameter: Data pin number.
4th parameter: Busy pin number.
*/
Wtv020sd16p wtv020sd16p(resetPin,clockPin,dataPin,busyPin);

void setup() {
 //Initializes the module.
 wtv020sd16p.reset();
}

void loop() {
 //Plays synchronously an audio file. Busy pin is used for this method.
 wtv020sd16p.playVoice(0);

}



What are you think, what is the problem?

kalata23

Guys, I have that module WTV020m01.. I tried to turn it on with push buttons instead of arduino. It couldn't play .ad4 files, nor wav. I tried everything, lowering down the records volume and so on.. I tried to connect the 6-th SD CARD pin with 8-th of the module, it didn't work also. My SD card is 2GB, I dunno what is the manufacture, but THE SOLUTION WAS FORMATING THE SD-CARD INTO FAT(DEFAULT) FORMAT SYSTEM. When the module didn't work, the sd-card was in fat32 system, but after formating the card again in just FAT i worked perfectly.
I hope that works for most of you too.

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy