Basically I have a skull thing that I want to make the jaw move to a voiceline or something to make it look like its talking. I need a way to take an audio file and sync it to the jaw moving with the servo. I'm not very familiar with c++ and im not sure how I could do this
- Did you simply want the jaw to open at a certain sound volume then closed when the volume goes to zero ?
Yes that's what i had in mind i just don't know how to
Use the file to actually produce the sound and amplify it to a speaker. Use a microphone board to listen and use the digital output of the board to tell your Arduino when the volume reaches the level you want. Then you code can move the jaw.
-
Feed the output of an Arduino sound sensor to the analog input on an Arduino.
-
Connect a strong enough servo (MG996R might work for the skull jaw) to an Arduino digital output pin.
Power the servo with a 6v battery pack or AC to 6v DC power source, connect the Arduino GND to the servo GND.
-
Write an Arduino sketch that reads the sound sensor signal; when this reaches a selected level move the servo from 0° to 90° (or as needed).
-
When the sound sensor signal, goes to zero (or whatever) reverse the servo.
-
You could have it so different volume levels moves the servo to different servo positions.
-
Adding random servo movements (enabled by the sound sensor) can make jaw movements more believable to the observer.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.