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
Resolved Resolved by Nomad 6R!

How Do I Create A Servo "Look Alive" Type Script That Runs Continuously ?

I have a robot that is using the AutoPosition skill to move some servos to specific frames and actions when key words are spoken.
I am trying to see if it is possible for another script to run independently of all others keeping the robot's eyes looking around continuously even if there isn't a specific command sent to look right or look left. 
This script would need to run simultaneously while other skills are triggering other servos.

How would I approach this?

Related Hardware OpenCM 9.04
Related Control Script


Upgrade to ARC Pro

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

AI Support Bot
Related Content
#1   — Edited
hi fxmech

what do you use for the eye movement?
you can choose any port .


normal its    servoRandom(D14,10,20)
Sorry if my questions are silly... I’m super new to this environment...
the code you posted looks good assuming it is in a place where it will loop independently from the other skills that trigger only when something happens...
Where would this script reside?
Im literally putting together my first ARC project so feel free to assume I know nothing:)
am new to programming too and there are no silly questions.

take an empty script in your project .and do some testing with one servo .
see what it does .use the above as excample .
here's a picture where to find all.

User-inserted image
That right there was the little piece of info that made everything make sense to me (and kept me up all night thinking about bots)!
So as I understand it, a script placed alongside skills is like an independent program that can run indefinitely if needed.
So the script can send commands to the other scripts or skills and receive info from them.
Makes perfect sense...  I might be finally breaking out of my linear programming mentality!
Thanks again guys.
#7   — Edited
I understand where you're coming from. When I first transitioned to event OO programming on PC in the mid '90s, it was a big mind shift from my former basic/assembler days of the apple ][ lol. Dating myself:D

The Auto Position Movement Panel can also START and STOP a script using the controlcommand. So you can have the "idle script" start when the Auto Position stops, and have the "idle script" stop when the Auto Position starts. Take a look at the Auto Position Settings tab

User-inserted image