Welcome to Synthiam!

The easiest way to program the most powerful robots. Use technologies by leading industry experts. ARC is a free-to-use robot programming software that makes servo automation, computer vision, autonomous navigation, and artificial intelligence easy.

Get Started
Asked — Edited

Servo Programming

Greetings! I'm totally new at this so please bear with me. I'm hoping to use one servo to operate an animatronic puppet mouth (the jaw is basically going to be an upside-down mousetrap on a pole, with a stiff wire connected to the servo). Here is how I've tried to program the EZ-B so far (although I'm sure I must be overlooking some things):

Servo(D0, 1)
Servo(D0, 18)
Servo(D0, 1)
Servo(D0, 18)
and repeat

You get the general idea it's supposed to just open and close (eventually, I'll get a little more sophisticated with the mouth movement!). Anyway, the servo sort of jumps back and forth a little when I run the program, but that's about it. Also, I can't seem to be able to save the program after I shut down the EZ-B. Any help would be greatly appreciated. Thanks!

John

:)


ARC Pro

Upgrade to ARC Pro

Synthiam ARC Pro is a cool new tool that will help unleash your creativity with programming robots in just seconds!

PRO
Synthiam
#1  
Hey John!

That sounds like a fun project:) There are these eyes you might be interested in also. I came across them a while ago on ebay. They'd be really easy to use too

You will need to delay between servo set commands. Try this...

Code:


Servo(D0, 1)
sleep(1000)
Servo(D0, 18)
sleep(1000)

... Rinse and repeat:D


What you can do also for the mouth to be a little more interactive is try this script out...

Code:


Servo(D0, 1)
SleepRandom(500, 1500)
Servo(D0, 18)
SleepRandom(500, 1500)
#2  
That must be what I was missing. I will give it a try. Many thanks!
PRO
Synthiam
#3  
No problem John.. I also just thought of this..

Code:


Servo(D0, 1)
SleepRandom(500, 1500)
ServoRandom(D0, 10, 18)
SleepRandom(500, 1500)


With that code, it will move to a random servo position. That'll be pretty sweet because the mouth will partially open and stuff. But it will always close.
#4  
I tried it and it worked! I'll continue building the mouth and then build the face around it. Pictures coming soon, hopefully. *eyeroll* Thanks again!
PRO
Synthiam
#5  
Face? Oh my! This is starting to sound cool!