Kinect Body Control icon Kinect Body Control — Control robot servos with Microsoft Xbox 360 Kinect body tracking; map joints to upper/lower body servos with smoothing and pause control. Try it →
Asked — Edited

Script Help, Doing More Than One Thing At Once

Hey everyone,

Project has 3 Hbridges (robo claw). All controlled serially example...

Sendserial(d0,38400,125)# lft track forward 1 sec sleep(1000)

What I would like to do is while moving forward I would like its body controlled H-bridge to start moving body up so that full body extend will be in process before machine reaches kitchen.

Ive tried something like...

Sendserial(do,38400,125) , Sendserial (d1,38400,70)

But obviously it doesn't work. Im sure its something using control command.... but I haven't got my head wrapped around the whole ControlCommand thing yet. Thanks in advance.

                  Chris

ARC Pro

Upgrade to ARC Pro

Experience early access to the latest features and updates. You'll have everything that is needed to unleash your robot's potential.

#9  

Whenever you are ready to stop both motors (even at different times) use a variant of the code below... remember you can have as many lines in a script as you wish.... Use each line as a flow of events so to speak... start one motor... wait, start another motor, wait some more, stop the first motor, wait, stop the second.... done


Sendserial (d0,38400,0) # Stop motor controller1

sleep(4000) #stop motor controller number 2... 4 seconds later

Sendserial (d1,38400,0 # stop motor controller number 2

Use the sleep commands to control when the motors start and stop:)