Welcome to Synthiam!

Program robots using technologies created from industry experts. ARC is our free-to-use robot programming software that makes features like vision recognition, navigation and artificial intelligence easy.

Get Started
Asked — Edited

Joystick

Hello,
When programing the joystick the first column says Btn Down Cmd and this works great. The second column says Btn Up Cmd. I can't seem to get this to work. Any help would be appreciated.

PRO
Canada
#1  
Hello Bookmaker,

I don't know if anyone has said it yet but Welcome to the forums!

So the way the Button Cmd systems works is that on button press the script that you have in the Btn Down Cmd box will activate and as soon as you let go of the button the Btn Up Cmd box will activate.

On my robot I call ServoUp(d17, 2) on button activation
Then as soon as I release it I then call Servo(d17, 31)

This action will put my servo up a couple of positions Up when I press the Joystick button down and then when I release it, it will always return to the 31 position.

Hope this helps.
#2  
Greetings!

I'm still kind of new to all of this and I have an addition joystick question.

Using the ARC Application can you assign scripts to run after a joysticks Btn Down Cmd' action?

And if so can you post an example?

Thanks!
PRO
Synthiam
#3  
if you'd like to have a servo on port D0 move to position 5 when the button is pressed, enter this in the Btn Down cmd

Code:


servo(d0, 5)


and to have the servo return to position 10 when the button is released, enter this in Btn Up

Code:


servo(d0, 10)


if you have a script control, and the control is called "MyScript", and you'd like to execute that script on Btn Down, enter this:

Code:


ControlCommand("MyScript", scriptStart)


there is a tutorial video on how to use the joystick. Look under the Tutorial tab on this website:)
#4  
Thanks DJ,

The Script Control example helped.
I did watch the Tutorial video but it kind of glosses over the scripting control part at the end.
It does help to see an example.
Thanks again, this is a great product!
:)