(name v.s 'a') is it possible?

no, your obviously mis-informed, or your just wasting my time on something you know is incorrect, even when faced with a direct quote about it. please refrain from posting on my posts again, your just wasting my time and i do not appricate it

I've been using sprintf for over thirty five years.
I know what it does.
I know what it doesn't do.

It does not send anything to serial.
Ever.

(sp. "you're misinformed" "you're just wasting my time")

I'm getting a hint of this.

It also doesn't play wav files. Which was what I was asking about in the first place.

That bit was for you to fill in.
You said you were getting comfortable with variables.
"buffer" is a variable.

Oh my. Awol knows what he is talking about here, on several counts. Take a nap and go back quite a few posts afterwards - everything you need is there.

I noticed on another of your topics that then you said you'd been up for forty eight hours.
On this one, it's thirty six hours.
You can't keep this up.

(I've done plenty of all-nighters in my youth - they're supremely counter-productive, no matter how much caffeine is available)

OMG, stop the madness!!! How could you have possibly written a 3000 line program without having the slightest clue regarding the most basic constructs of the language? Do yourself a favor, set this project aside for a while and learn the fundamentals of C++ programming.

Before you do, here's one more fish for you:

void playWav (char* name);

void setup() {
}

void loop() {
  //...
  //...
  playWav ("alarm");
  //...
  //...
}

void playWav (char* name) {
  char buffer [40];
  //..
  //..
  sprintf (buffer, "wav/%s.wav", name);
  file = new AudioFileSourceSD(buffer);
  //...
  //...
}

BTW, if the memory leak I warned you about shows up, it will make this problem seem like child's play. You'll get random crashes at random times in random locations and won't have a clue what's causing it. So, I'd make sure those dynamically-allocated objects eventually get deleted.

Now, go learn to fish.

I want to apologize for earlier. It did not click in my head that it could actually do what I wanted, after some research your right and I'm in the wrong and not afraid to admit such. So please take my sincere apology.

And as for doing a 3k project without knowing basics is the sheer fact I jumped head first into the deep end. Did a lot of research and took examples and formed and molded them to do what I needed. But never took the time to learn the basics first. It ass always this is what I need that's advanced let's research it and find examples to follow. So yes I never really, learned the basics. And that's my fault.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.