Asked — Edited

How Do I Make A Servo Move Up And Down In A Continous Motion??

I want to make Wall-E head move up and down but in a continuous motion using script, is this possible? that is the servo is not jumping from specified servo position to another and skipping all the in between positions, sort of like how you would slide the servo control slider up and down. Is this even possible using script?

I want to create some lively expression for Wall-E but im stuck at this part, i don't have much option for programming since im no programmer. I can make him move up and down but it doesn't look very natural jumping to different servo positions. Any help would be greatly appreciated.


ARC Pro

Upgrade to ARC Pro

Discover the limitless potential of robot programming with Synthiam ARC Pro – where innovation and creativity meet seamlessly.

#1  

Im not that great of a programmer but how about varying the speed with each loop from the head's low point to it's hi point. Also vary the servo speed again when going the other way. An added bit of personality is to vary the highest point it moves and the lowest point it moves with each loop. I did a similar simple test before my EZ stopped linking. It tested the left and right motion of my bot head. I varied speed and position and time after each movement. It was kinda creepy. I posted it to the cloud under examples\random servo head turn. Now I wished I taped it. :/ If I had my board working I could try and write and test this for you. All I would need it the lowest position the head can move and the highest. I could try but I wouldn't be able to test it. See if my simple 2 line personality gives you an idea.

#2  

I'll check out your cloud file and play around with it some more later. Thanks.

#3  

Ok. Its nothing special but a random movement test.

#4  

makke a small scrpit of the nexk moving p and down

servo(d10, 50) servo(d10, 10) servo(d10, 50) servo(d10, 10)

name is up and down

then in the personality generator use the

commandcontrol(scriptstart, "upanddown")

and boom theat small scrip tyou made will be executed.

always remember that the servoup / servodown commands can be used here too

ifservo / waitservo cammand are great too...

#5  

also,

goup: servo(d10, 50) goto(godown) goto(goup)

:godown servo(d10, 10) goto(goup) goto(down)

this will make it go up and down for ever and ever and ever and ever

add in some ifservo(d10, ..... commands and it will wait for adc ports or other servos to move first before this script is executed.

#6  

ok im not sure i get all of that, I will play around some more with different scripts. Lets move this discussion to my Wall-E build thread to keep things in order. Thanks guys.

PRO
Synthiam
#7  

# Set the servo speed to a nice slow smooth motion
ServoSpeed(d10, 5)

# The start of the main loop
:Loop

# Move the servo to the low position
Servo(d10, 10)

# Pause for 5 seconds while we wait for the servo to move into position
sleep(5000)

# Move the servo to the high position
Servo(d10, 50)

# Pause for 5 seconds while we wait for the servo to move into position
sleep(5000)

# Go to the start of the loop
Goto(Loop)

#8  

Thanks DJ, Almost got it to work by combining relative servos with external control but how can i enable relative servos "external control" only for the SayName function and turn off at the end of the script? i don't want every other movement to be relative to the neck servo. Is this even possible? You can response to my Wall-E thread if you want, i don't want to double post:)

PRO
Synthiam
#9  

the next version will let you unpause or pause the relative servo control

#10  

That's great! What i need is really just disable a function within the Relative servo window "Response to movement for external controls" or is that the same? In that case im moving on for now.