Asked — Edited

Making A Robot Bear. Need Help

Hi guys! I have successfully created a robot bear, but I am having some problems.

  1. He doesn't listen to voice commands
  2. When he talks, the servo will not stop after he is done. It is a 360 degree servo, and I have tried to get him to talk through scripts and the talk servo. He successful starts moving his mouth, but it will not stop when the audio is done.
  3. Finally, I would like to know how to get him to sing to mp3 music.

I could really use some help, it's my first robot. Thanks!:)


ARC Pro

Upgrade to ARC Pro

Join the ARC Pro community and gain access to a wealth of resources and support, ensuring your robot's success.

#9  

I decided to go with the 180 servo. And starting out, I would like to use the sound board ezb.:)

United Kingdom
#10  

You could use the "Talk Servo" control and set your bears mouth servo up, then add the "Soundboard EZB" and add your MP3, and sing along with SayEZB() commands.

Another way could be to use the servos minimum and maximum positions in a script to make the mouth move for the length of time the singing parts last for, using sleep() commands or changing the servo speed to match the words and pauses being sung to make the mouth move faster or slower depending on what's being sung, which would make it more natural looking.

Follow the "Your First Dance" tutorial to get an idea of how to edit and add script within a music track. Hope that all makes sense.

United Kingdom
#12  

No problem. It's hard to give you a script example, as it would depend on the song, lengths of time for the singing parts, and what words are being sung (for the more natural look). Good luck, and keep us posted on your progress... maybe even a short video if you're game.:)

#13  

Hmmm... it doesn't seem to work.. is there like generic code I could work off of? Sorry about that. I'm very new at scripting.:)

United Kingdom
#14  

Actually thinking about it, using the talk servo control to sing along to an MP3 won't quite do what you want (I was thinking of using speech synthesis to sing along over the MP3, but that's not what you want and wouldn't work very well. Sorry about that). If I understand correctly, you would just like the mouth to move with a song being played.

So that being the case, the second option in post #11 would be the one to use. Use something like...

#Asuming servo is connected to port D5.
#Set a servo speed.

Servospeed(D5,1)

#open mouth
Servo(D5,130)
Sleep(400)

#Close mouth
Servo(D5,70)
Sleep(200)

#Open
Servo(D5,130)
Sleep(300)

#Close
Servo(D5,70)
Sleep(250)

#Open
Servo(D5,130)
Sleep(350)

#Close
Servo(D5,70)

This would go at the starting points of any lyrics being sung on the MP3 track. Add more mouth opening and closing script lines, and change the length of sleeps to go with what is being sung. It may take a while to go through the whole song, but once you get the first verse or chorus of the track right, you'll have an idea of what to do for the rest. Hope that helps a little.