So recently ive been trying to make a 6 motor Arcade control base, but its not working. Can i get some help please?
A simple program to control a 6 motor drive may be this.
#pragma config(Motor, port1, left_1, tmotorVex393_HBridge, openLoop)
#pragma config(Motor, port2, left_2, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port3, left_3, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port8, right_1, tmotorVex393_MC29, openLoop, reversed)
#pragma config(Motor, port9, right_2, tmotorVex393_MC29, openLoop, reversed)
#pragma config(Motor, port10, right_3, tmotorVex393_HBridge, openLoop, reversed)
//*!!Code automatically generated by 'ROBOTC' configuration wizard !!*//
task main()
{
long drive_l_motor;
long drive_r_motor;
while(1) {
// get js values
drive_l_motor = vexRT[Ch3] + vexRT[Ch4];
drive_r_motor = vexRT[Ch3] - vexRT[Ch4];
// deadband
if( abs(drive_l_motor) < 15 )
drive_l_motor = 0;
if( abs(drive_r_motor) < 15 )
drive_r_motor = 0;
// send to motors
motor left_1 ] = drive_l_motor;
motor left_2 ] = drive_l_motor;
motor left_3 ] = drive_l_motor;
motor right_1 ] = drive_r_motor;
motor right_2 ] = drive_r_motor;
motor right_3 ] = drive_r_motor;
wait1Msec(20);
}
}