Show Posts
Pages: [1] 2
1  Using Arduino / Audio / Re: New library for PWM playback from SD cards: SimpleSDAudio on: February 24, 2013, 10:00:51 pm
Can you take a picture of your setup and post it here?

Are you using an SD Card or a Micro SD Card in an adaptor?

What's the error code thrown out by the BareMininumWithDebug example, error code: 1 or error code: 08?

if it is error code 1, if your not using a shield, check your connections and contacts with the SD-Card pins. if it is error code 8, try level shifting using 1.8k and 3.3k resistor.

I recently had a problem with my setup above using CD4050. So i ditched that setup and use resistor divider with above values. I am using a micro-sd on an adaptor.

also if no error code and it is saying in the serial monitor "Initialising SD card...Wiring is correct and a card is present....... playing EXAMPLE.AFM.found.playing" lean-in, or put the speaker, closer to your ear, the audio volume is quite low. that it can be unnoticeable when your in a noisy environment.

and my *duino is even more crappier than yours  smiley-lol  smiley-grin smiley-grin  smiley-lol and it's from five years ago...

http://arduino.cc/forum/index.php/topic,24039.msg181921.html#msg181921
2  Using Arduino / Audio / Re: New library for PWM playback from SD cards: SimpleSDAudio on: February 23, 2013, 10:12:19 am
That Gizduino+ is a Sanguino clone. The SPI pins are on Digital pins D5, D6, and D7:

D5 - MOSI
D6 - MISO
D7 - SCK

and yes, level shift your pins. A simple resistor divider, as suggested, or you can use a 74HC4050 (CD4050 can be used if you can't get it locally).

connections using CD4050:

SD Card Pin----CD4050 Pin-----Gizduino+
CS--------------15         14-----D4
MOSI-----------12          11----D5
SCK------------10          09----D7
MISO----------------------------D6

the CD4050 connections can also be used with your Gizduino mini:

SD Card Pin----CD4050 Pin-----Gizduino mini
CS--------------15         14-----D4
MOSI-----------12          11----D11
SCK------------10          09----D13
MISO----------------------------D12



3  Using Arduino / Audio / Re: New library for PWM playback from SD cards: SimpleSDAudio on: February 13, 2013, 06:23:46 am
Forgive me for asking this, I'm just recently learning about SPI and I2C. But can I use an I2C device (specifically an accelerometer e.g. ADXL345) together with this library? My plan is to play a sound based on the accelerometer's inputs.
4  Using Arduino / Audio / Re: Arduino library for WTV020-SD-16P audio module on: February 03, 2013, 01:08:10 am
Well, it was definitely my code.

Anyone got ideas how to have this play a pseudo-gapless/seamless loop? Or this is just the limitation of this sound module.
5  Using Arduino / Audio / Re: Arduino library for WTV020-SD-16P audio module on: February 02, 2013, 09:28:53 pm
Thanks! Got it.  smiley-lol This should keep me busy.
6  Using Arduino / Audio / Re: Arduino library for WTV020-SD-16P audio module on: February 02, 2013, 07:23:58 pm
can you post the code you used on the previous video? So i can try it on my board. I don't want to rule out another SD-Card problem, cause I have already tried several cards, before I got it to make a sound.   smiley-mad this thing is pesky with sd-cards. smiley-cry

Also, I tried playing a voice and have it loop, well, it can't do gapless loop.

@xl97: your board looks good, do you sell them cause I'm interested.
7  Using Arduino / Audio / Re: Arduino library for WTV020-SD-16P audio module on: February 02, 2013, 12:56:30 am
Why not use .stopVoice method?

Thank you for the reply.

I tried that too.

Even tried using pin change interrupts, thought maybe it just the delay in reading the digitalRead status for the pins.

Basically, what I wanted to achieve, is that whenever a button is pressed, it will interrupt the currently playing sound clip and play the sound clip associated with the button that was pressed (Even if it was the same button).

Here's the code I'm using:
I'm using the pinchangeint library.

Code:
/*
 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>
#include <PinChangeInt.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.

#define BUTTON01  7
#define BUTTON02  8

/*
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 playSound01(){
  wtv020sd16p.stopVoice();
  wtv020sd16p.playVoice(0);
}

void playSound02(){
  wtv020sd16p.stopVoice();
  wtv020sd16p.playVoice(1);

void setup() {
  //Initializes the module.

  pinMode(BUTTON01, INPUT);
  digitalWrite(BUTTON01, HIGH);
  PCintPort::attachInterrupt(BUTTON01, &playSound01, RISING);
 
  pinMode(BUTTON02, INPUT);
  digitalWrite(BUTTON02, HIGH);
  PCintPort::attachInterrupt(BUTTON02, &playSound02, RISING);
 
  wtv020sd16p.reset();
}

void loop() {
 
}
8  Using Arduino / Audio / Re: Arduino library for WTV020-SD-16P audio module on: January 31, 2013, 11:52:35 pm
I think it's okay, the Wtv020sd16p.cpp~ might just be a temporary file that was not deleted.

Thanks to Rebel for the Library! I got it to work on my module, after trying several SD-Cards. Talk about this thing is picky with SD-Cards.

Does anyone have any idea on how to interrupt the currently playing voice, and play another one when a button is pressed?

I tried modifying rebels playVoice function into:

Code:
void Wtv020sd16p::playSound(int voiceNumber){ 
 if (_busyPinState==HIGH) {
  sendCommand(STOP);
 }
 else {
 sendCommand(voiceNumber);
 }
  _busyPinState=digitalRead(_busyPin);
  while(_busyPinState==HIGH){
    _busyPinState=digitalRead(_busyPin);
 }
}

it checks for the busy pin's state, if it is HIGH, send the STOP command, and then play the voice.

Unfortunately it does not work. Or i'm just not doing it right.
9  Using Arduino / Motors, Mechanics, and Power / Re: GRBL stepper motor driver wiring on: November 23, 2011, 12:09:49 am
Yes but they can also be used as normal digital input and output as well.

Aha! thanks for the confirmation, I'm going to try it when i get home.
10  Using Arduino / Motors, Mechanics, and Power / Re: GRBL stepper motor driver wiring on: November 22, 2011, 07:14:17 am
Hi, thanks for the reply, it's a hand built arduino, a variant of the Severino (S3V3). I haven't modified grbl, just uploaded the prebuilt hex file for atmega168.

I have look at the config.h in the 0.51 branch of grbl, and it is assigned to portc. Which I think in arduino is mapped to analog inputs 0-5. I was hesitant to connect to these ports since they are for analog input; but someone could correct me on this.
11  Using Arduino / Motors, Mechanics, and Power / GRBL stepper motor driver wiring on: November 20, 2011, 06:14:28 am
Hi guys, I made a stepper motor driver based off on reprap version 1.2 stepper driver. I uploaded the grbl 0.51 to my arduino, and now needs help on where to connect the step and direction pin to the arduino. I've tried connecting it to Digital 0, 3 but nothing happens.
12  Forum 2005-2010 (read only) / Development / Re: Another New PCB for Arduino Serial Single Sided on: August 06, 2009, 08:35:42 pm
@vios: You can burn the bootloader via the parallel port using the parallel programmer details about this can be found here:

http://www.arduino.cc/en/Hacking/ParallelProgrammer

With the single sided board, what I did to successfully burn the bootloader using the parallel programmer was to desolder LED13 first.

@poldoj: Nice job! congratulations.

I have tried upgrading the Severino with the atmega328, and it works! just make sure you select the correct chip on the arduino software.
13  Forum 2005-2010 (read only) / Development / Re: Another New PCB for Arduino Serial Single Side on: August 13, 2008, 06:27:44 pm
Adilson the board works! Thank you!

Though I have some trouble loading the bootloader using 0011. But what got the bootloader to work was I disconnected LED13 first.









And... I'm interested in building your Max232 variation of the Severino :-) can't wait for it..  ;D
14  Forum 2005-2010 (read only) / Development / Re: Another New PCB for Arduino Serial Single Side on: August 11, 2008, 12:48:38 am
Thank you Adilson here's the board that I've made:



not yet finished though, I still haven't received my atmega168 and crystals  smiley-sad

please comment, correct, if what I've done is okay, not good (newbie here)  smiley While waiting for the 168 and crystal, I decided to do some tests.

1. I plugged in a 9 volt battery, and measure the voltages in 5V and 9V, pins 7,8, 20, 22 of the 28 pin IC socket, and pins 2, 5, 6 of the ICSP header. All are okay and registered ~+5V.

2. Next I decided to test the RS232 TTL circuit, by setting the serial enable jumper. Measured pins 2 and 3 (on the IC socket) and the voltage is +5V, then I jumpered them, this is where I kinda (scratch head) ask the forum for comment. Well, the RX and TX LED should both light up right? but on mine it did not right away, it takes a couple of seconds. Sometimes not at all.

3. I also plugged to my computer open hyperterminal. With pin 2 and 3 jumpered when I press a key on the keyboard the RX/TX LED lights up as it should. Un jumpered it, and only the RX led lights when I press a key on the keyboard.

Is there something wrong with my board? Especially with the #2. I've checked all connections and all are okay.

Thanks very much! Can't wait to start uploading sketches to my Severino.  smiley-grin
15  Forum 2005-2010 (read only) / Development / Re: Another New PCB for Arduino Serial Single Side on: August 04, 2008, 01:43:05 pm
I'm humbled by your statement, but I'm no expert, just a curious student that continues to learn things :-). Your layout is already excellent I don't want to change a thing.

Ok now I'm confused   :smiley what I edited was the schematic I downloaded at http://www.arduino.cc/en/uploads/Main/Arduino_S3v3_R2_EAGLE_again.zip. I wasn't able to take a look at the .png schematics, I go straight to the eagle files (I'm such an eager beaver).

ummm so my revision above is fine?  smiley-grin
Pages: [1] 2