Hi, so I have a really weird issue. So I can’t get my drive to run at all with PROS, but it works perfectly fine with ROBOTC.
I used this ROBOTC code:
#pragma config(Sensor, in2, mogoPot, sensorPotentiometer)
#pragma config(Sensor, in3, gyroSense, sensorGyro)
#pragma config(Sensor, in4, liftPot, sensorPotentiometer)
#pragma config(Sensor, in5, chainbarPot, sensorPotentiometer)
#pragma config(Sensor, dgtl1, rightEncoder, sensorQuadEncoder)
#pragma config(Sensor, dgtl11, leftEncoder, sensorQuadEncoder)
#pragma config(Motor, port1, mogoMotor, tmotorVex393_HBridge, openLoop)
#pragma config(Motor, port2, intakeMotor, tmotorVex393TurboSpeed_MC29, openLoop, reversed)
#pragma config(Motor, port3, liftMotor, tmotorVex393HighSpeed_MC29, openLoop)
#pragma config(Motor, port4, chainbarMotor, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port5, driveBackRight, tmotorVex393HighSpeed_MC29, openLoop, reversed)
#pragma config(Motor, port6, driveFrontRight, tmotorVex393HighSpeed_MC29, openLoop, reversed)
#pragma config(Motor, port7, driveFrontLeft, tmotorVex393HighSpeed_MC29, openLoop)
#pragma config(Motor, port8, driveBackLeft, tmotorVex393HighSpeed_MC29, openLoop)
#pragma config(Motor, port9, driveMiddleLeft, tmotorVex393HighSpeed_MC29, openLoop)
#pragma config(Motor, port10, driveMiddleRight, tmotorVex393HighSpeed_HBridge, openLoop, reversed)
//*!!Code automatically generated by 'ROBOTC' configuration wizard !!*//
task main()
{
while (true) {
motor[driveFrontRight] = 127;
motor[driveMiddleRight] = 127;
delay(20);
}
}
and the right side worked fine.
I do this in PROS:
#define BACK_RIGHT 5
#define FRONT_RIGHT 6
#define FRONT_LEFT 7
#define BACK_LEFT 8
#define MIDDLE_LEFT 9
#define MIDDLE_RIGHT 10
void setDrive(int left, int right) {
motorSet(FRONT_RIGHT, -right);
motorSet(MIDDLE_RIGHT, -right);
}
void operatorControl() {
while (1) {
setDrive(127, 127);
delay(20);
}
}
And then pros mu to download it, and the right side motors make a small sound like they get power, and immediately turn off. If I lift up the robot, the right side goes full power and then slowly goes down to 0. I’m using PROS v2.6.1.
Thanks!