Singapore
Asked — Edited

Forward And Stop Command In Joystick

Hi everyone I am trying to create a Quadruped.

i have created a forward movement script and the ControlCommand scripts for "Forward" and "stop"

now, when i use the jobsticks, The forward script will not stop playing

does anyone know how do i make it such a way that when i release the d pad in the joystick, it will deactivate the "forward" script?

my code as follows:

ServoSpeed(D15,2) ServoSpeed(D16,2) ServoSpeed(D18,2) ServoSpeed(D19,2) :forward Servo(D15,40) Servo(D18,40) Servo(D16,60) Servo(D19,60) Sleep(800) Servo(D15,60) Servo(D18,60) Servo(D16,40) Servo(D19,40) Sleep(800) Goto(foward)


ARC Pro

Upgrade to ARC Pro

Your robot can be more than a simple automated machine with the power of ARC Pro!

United Kingdom
#1  

Don't you just need to program the Joystick like this?

User-inserted image

Or don't you have a movement panel?

#2  

Yes I am using the Movement Panel script

I have forward script and stop script In Movement Panel script, I use command

ControlCommand("forward",startScript)

And

ControlCommand("stop",startScript)

I am using Logitech rumble pad. When I shift my left analog stick up , the forward script is started

When I release it the stop script is started. However, the forward script won't stop.

I need the forward script to stop. Any idea?

#3  

I see you have two different scripts for forward and stop. Try adding controlcommand("forward", scriptstop) for Stop Command or add it at the beginning of your stop script if it is a separate script. Your forward is in a loop so it will loop forever until the entire script is stopped. I'm still playing with scripts with my Wall-E build but at least i think that's how it work.

United Kingdom
#4  

You need to add a test condition at the end of your script to see if the joystick has the same button pressed then loop back to :forward. I don't know how your bot moves but just removing the Goto may work for you

#5  

Hey guys,

My bot moves in a gait sequence.

Currently my stop script which actually level all 4 legs to the center (servo pos 50)

I will try and follow Louis T suggestion. i am currently at work.

#6  

Hey guys i manage to make him walk a little!:)

PRO
Synthiam
#7  

Omg. That. Is. Amazing.

Seriously, very impressed!!

#8  

We are all your deciple. You are the master who created this wonderful piece of technology. I won't be surprise if I were to if every household robot has a ez b chip in the future:). Thanks DJ sures

United Kingdom
#9  

Well done you Awesome can't wait for more vids of you progress

#10  

More videos.

Apparently he is now able to walk, reverse and turn

His remote control still does not all to stop the scripts from running.

Any idea of how to resolve this?

User-inserted image

User-inserted image

confused

#12  

Solved

I just need to add

ControlCommand ("forward", scriptStop)

In the first line of stop script.

This applies to all

Now. My bot is fully controllable with my Logitech rumble pad 2:)

I am so happy with Carbio's progress:).

I will sure post more pictures and videos.