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

Get access to the latest features and updates before they're released. You'll have everything that's 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:)