Talking Skull Halloween project - which has probably been solved a billion times

Hello,

I'm brandy new with the Ardunio and am getting my footing.

I'm sure that this has been solved a million times, but need to ask.

OK, the usual talking skull.

I've got the skull, and a servo hooked up to the jaw to make it work. I was using the Scarry Terry kit of old, but never liked the full open or closed as the only options. And it just never worked well. But the skull and mounting kit for the servo is really well done.

So I've got a PIR to trigger the the audio playback.

I've got the Adafruit "Music Maker" MP3 Shield for Arduino. I've loaded it up with an MP3 file, and am now merging the sketches so the PIR will trigger the single audio file I've got on it.

Now the issue is with getting the Servo to sync with the audio.

What I was hoping I could do is play the audio back, use a rotary encoder or Pot to crudely record the servo motion in time with the audio.

But it looks like this may not be possible, because I've got audio 30 seconds long. And from what I've read, the Uno can only read 12 seconds/512 samples? Can I do something like this?

I've also seen that someone used DTMF decoding to drive the servo. One channel audio, the other channel DTMF.

I'm quite handy with audio software (have Cubase), and could do the DTMF route.

I am assuming that I can do this all with just the PIR, one Uno, and the MP3 shield, and I don't need any other hardware.

Can someone please provide a little guidance, and maybe some code. :slight_smile: Espcially on the DTMF if that's the best course of action. I need to sort out how a particular DTMF will set the servo in a particular place, and also how to zero the servo.

Thanks.

Michael

How about this - make a large array, and just capture the time via button press of When the mouth is to move. Have 2nd array with the position it is to move to with each press (the pot read, or similar, that will determine the servo position).
Then for playback, when millis >= the time stored for position 1, read the servo value and move it.
Then watch for time 2, read servo value & move.
If put those times & positions in a PROGMEM array, you would not be limited for duration.