When using digital joystick imput motors are not moving normally

When I use this code (see attached) the motors start and stop rapidly and do not spin correctly (I have tried changing the motor spin values but that does not fix the problem)
The motors are powering mechanism wheels that are driving the robot. Some have a 1 to 1 gear ratio

Is this code in your while loop? Maybe you could post an image with more of your code?

while(1) {

motor[port1] = vexRT[Ch2];
motor[port10]= vexRT[Ch3];
I use something like this… hopes it helps…

That looks like something you would write in ROBOTC, but it looks like @Christopher is using something like EasyC, so it doesn’t really apply here.

I am using easyC for speed but may move to robotc

It looks like you are assigning values to the motors twice. The first group sets values based on the joysticks and then the second group sets values based on the Group 7 button collection so they cancel each other out. (That is, unless you hold the joystick and press the corresponding button at the same time.)


It looks like you are using tank drive so you could replace all of your code with one function: Tank - 4 motor.pasted_image.png

Would I be able to still use digital joystick? I am using a mechanism wheel set and need the triggers to move it sideways


I found the solution https://vexforum.com/t/robotc-bad-programming-habits/28357/1
For future reference.

You can use the Holonomic function then. Here is a link