Go Down

Topic: New library for PWM playback from SD cards: SimpleSDAudio (Read 45 times) previous topic - next topic


That's great, many thanks.. I'll have a crack at it


Been studying the demo sketch and can see roughly what bit is doing. I am trying to find out how to issue a serial command from within the program (rather than via the serial monitorto select and play a file. I'm afraid I am very new to Arduino and am perhaps taking on too much here but I just cant see how to do it.


Hi folks, good news from me:  8)
I've updated the library and now you don't need to call worker() anymore if you provide the SSDA_MODE_AUTOWORKER flag at initialization. I've also added a doorbell (with ding-dong-sound) example, the SD card file access example and edited the examples for autoworker-function. Also there is the fancy AbsoluteMinimum-Example to play the example-audio-file from card that contains just this:
Code: [Select]

SimpleSDAudio absolute minimum example, plays file EXAMPLE.AFM from root folder of SD card (CS on pin 4)
through speaker/amplifier at pin 9 for ATmega328 / pin 44 for ATmega1280/2560.
#include <SimpleSDAudio.h>
void setup()
  // SdPlay.setSDCSPin(10); // Enable if your SD card CS-Pin is not at Pin 4...

void loop(void) {



nice job..

(for those lazy.. here is the link to the lib:  http://hackerspace-ffm.de/wiki/index.php?title=SimpleSDAudio#Download)

  So using what you've posted.. all you need to do in the MAIN loop..

for a button 'check/press' is:

(dummy code:)

Code: [Select]
if(digitalread(button1) == LOW){
}else if(digitalread(button2) == LOW){


no need to init or de-init anything?

the more demos showing all the functions and features make for popular usage!!..

I still have gotten to the 2/4 channel stuff I saw mention.. or how all that works!  lol..

(side question and really more a general hardware questions.. is there any other things we can add to the single output on D9 to make it sound a bit better?..  I only have a 100uF cap right now.. no resistors any thing)..

I dont/wont have enough room to have a pot/wiper and a ton of extra components.. but if adding another cap or resistor or two will help improve..  Id like to try!).. I saw some examples use a resistor.. and some use only a cap..etc.


@Tuttut, did you see my post at #84 about use on the 1284P? Thanks.

Go Up