So I’m trying to make a basic code that controls a 2 motor drive with just the left joystick, so I made this simple code.
#pragma config(Motor, port1, Lmotor, tmotorVex393_HBridge, openLoop)
#pragma config(Motor, port2, Rmotor, tmotorVex393_MC29, openLoop)
//*!!Code automatically generated by 'ROBOTC' configuration wizard !!*//
task main()
{
while (true){
int leftpower = vexRT[Ch3] - vexRT[Ch4];
int rightpower = vexRT[Ch3] + vexRT[Ch4];
motor[port1] = leftpower;
motor[port2] = rightpower;
}
}
I don’t have my robot or controller with me, so I can’t test this, but I don’t know which direction I would have to push the joystick in order to get a positive value from channel 4. can someone tell me this?
Also, this is actually my first time with this software, so if these are any mistakes, please let me know.