We have lift mechanism that lifts the mobile goal when one of the joystick button is pressed (two 393 motors are attached to lift) and then it drops to the ground when the down button is pressed. After couple of up/down sequence, the robot light becomes yellow and also sometimes fully red.
port 2 = left wheel motor,
port 3 = left lift motor,
port 8 = right left motor,
port 9 = right wheel motor
We chekeced:
- all wire connections are okay and secured
- battery is charged.
What could be going wrong?
After Robot light is red then controller stops responding to any of the joystick button interactions.
This is the code snippet of lift task:
void setLift(int power) {
motor[liftRightMotor] = power;
motor[liftLeftMotor] = -power;
}
task lift {
while(true) {
if(vexRT[Btn5D] == 1) {
setLift(-127);
} else if( vexRT[Btn5U] == 1) {
setLift(127);
} else {
setLift(0);
}
sleep(15);
}
In order to lift and move goal to any location; we have to keep pressing the lift up button and at the same time keep pressing drive forward button.