Double Commands

Hi guys! Sorry to disturb you, but I need some help!

So my lift on my robot is very unstable, so I came up with an idea but don’t know how to execute it.

What I currently have is joystics controlling the Wheels.

What I want to do is something like this

-When button R2 pressed, and then joystick moved axis postition 2, move Lift up and down.

Oh that’s totally doable. You just tell the program if Button R2 is pressed Axis controls lift, but if Button R2 is not pressed then it controls wheels

1 Like

But how tho. Im super dumb and a freshman. Sorry to be of inconvenience.

Nah you’re fine, everyone has to start somewhere

I wouldn’t recommend you do that actually. you’ll want to be able to drive and lift simultaneously. I’d recommend using some of the buttons instead.

2 Likes

If you were to do that though, you would just need an if statement like
If(buttonpressed){
Set-motor1(joystick)
}Else{
Drivetrain code
}

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.