Only 1 Wheel is working on breaking point robot

I am trying to code my robot and only 1 set of the wheels are turning. The code says “arm” but if I change the ports it moves another part instead. How can I make it so that it can affect both wheels, the arm, and the linear puncher.

#pragma config(Motor, port2, Arm, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port3, RightWheels, tmotorVex393_MC29, openLoop, reversed)
#pragma config(Motor, port4, LeftWheels, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port5, Puncher, tmotorVex393_MC29, openLoop, reversed)
//!!Code automatically generated by ‘ROBOTC’ configuration wizard !!//

task main()
{
while(1==1)
motor(RightWheels) = vexRT(Ch2);
motor(LeftWheels) = vexRT(Ch3);
motor(Puncher) = vexRT(Ch1);
motor(Arm)= vexRT (Ch4);

if(vexRT(Btn7U) == 1)
{
	motor(Arm) = 127;
	wait(0.01);
}


if(vexRT(Btn7D) == 1)
{
	motor(Arm) = -127;
	wait(0.01);
}

if(vexRT(Btn8U) == 1)
{
	motor(Arm) = 127;
	wait(0.01);
}

if(vexRT(Btn8D) == 1)

else
	motor(Arm) = 0;

}
if(vexRT(Btn7U) == 1)

Welcome to the forum!

Your while statement needs brackets around what should be looped.

Right now, only the first line right after the while loop (right wheels) is being looped. Instead try putting brackets around the code you want infinite looped

E.G.

while(1==1)
{
//code to be looped here
}
3 Likes