Controller and motor help

Hello I want the 1 axis on my controller to control a motor on my robot, but I am unsure how to code it (I’m new) I want it to make it turn foward when the 1 Axis is to the left and make it go backwards when the 1 axis is towards the right side.

1 Like

This is relatively simple to do. First, you should set the motor velocity to the controller axis position, then spin the motor forwards. Both of these blocks should be in a forever loop so it is constantly checking the position.
image

4 Likes

Like in vex V5 pro since i don’t use the blocks

1 Like

There are a couple of tutorials you can find on youtube. This one explains how to program the controller axes.

2 Likes

It is easy enough to translate blocks to other languages because it is very basic logic. I don’t know how to write in pros, but it should just be a simple loop that tells the motor how fast to spin.

4 Likes