sync audio with servo

Hello,

I am working on an animatronic and I was wondering how I would sync the audio mp3 (Lets take the rooster.mp3 for example) with a servo, so I can have the animatronic talk. (When I activate it with a voice command, it replies with the mp3 as it’s mouth moves up and down).

Thanks.

It should be straightforward as the play() command is non-blocking. So you can just use play(soundfile) and then do your servo commands while the soundfile plays.

Hope that helpsl
Gerald

I agree with mp3 concept but if movi has a speaker and such then shouldn’t it be able double as its own sound sensor. I have the ability to use a sound sensor to make led bounce to music being played. It seems movi should do the same without having use an extra sound sensor movi should be the sound sensor. If so then it bounce led lights to external music being played and move servo, too. I can’t find anybody who has tried this and I don’t know the code well enough to try it from scratch.