Today is another normal day at FUMA, DeNeef and I went through 3 chapter of Amplify MOOC today which is a pretty big accomplishment, we plan to take the first quiz tomorrow see how well will we do. Another big accomplishment is that my robot is back online again, I finally fixed the problem that was in my program before and put my robot back online. The problem was the set up of motors on my program, the port was not completely matched, but after the repairing, everything went back online ad works fine. I also stepped into Autonomous programming, I used 2 encoders match with 2 DC motor which did guide the robot very accurate. Tomorrow, I will fix the jumping problem of one of the DC motor, at that point, the Robot will be done with the remote controlling mode. Here is the program I wrote today:
#pragma config(Hubs, S1, HTMotor, HTMotor, HTMotor, none)
#pragma config(Hubs, S2, HTServo, none, none, none)
#pragma config(Sensor, S3, IRSensor, sensorHiTechnicIRSeeker1200)
#pragma config(Motor, mtr_S1_C1_1, motorleft, tmotorTetrix, openLoop, reversed, driveLeft, encoder)
#pragma config(Motor, mtr_S1_C1_2, motorright, tmotorTetrix, openLoop, driveRight, encoder)
#pragma config(Motor, mtr_S1_C2_1, upperlift, tmotorTetrix, openLoop)
#pragma config(Motor, mtr_S1_C2_2, sweeping, tmotorTetrix, openLoop, reversed)
#pragma config(Motor, mtr_S1_C3_1, lowerlift, tmotorTetrix, openLoop)
#pragma config(Motor, mtr_S1_C3_2, arm, tmotorTetrix, openLoop, encoder)
#pragma config(Servo, srvo_S2_C1_1, pullarm, tServoStandard)
#pragma config(Servo, srvo_S2_C1_2, cylinder, tServoStandard)
#pragma config(Servo, srvo_S2_C1_3, servo3, tServoNone)
#pragma config(Servo, srvo_S2_C1_4, servo4, tServoNone)
#pragma config(Servo, srvo_S2_C1_5, servo5, tServoNone)
#pragma config(Servo, srvo_S2_C1_6, servo6, tServoNone)
task main()
{
nMotorEncoder[motorleft] = 0;
nMotorEncoder[motorright] = 0;
while (nMotorEncoder[motorleft] < 10000)
{
motor[motorleft] = 75;
motor[motorright] = 75;
motor[upperlift] = 50;
}
nMotorEncoder[motorleft] = 0;
nMotorEncoder[motorright] = 0;
while
(nMotorEncoder[motorleft] < 1200)
{
motor[motorleft] = 75;
motor[motorright] = 0;
}
nMotorEncoder[motorleft] = 0;
nMotorEncoder[motorright] = 0;
while
(nMotorEncoder[motorleft] < 8000)
{
motor[motorleft] = 60;
motor[motorright] = 60;
}
nMotorEncoder[motorleft] = 0;
nMotorEncoder[motorright] = 0;
while
(nMotorEncoder[motorleft] > -270)
{
motor[motorleft] = -60;
motor[motorright] = -60;
}
motor[motorleft] = 0;
motor[motorright] = 0;
wait10Msec(100);
servo[cylinder] = 225;
nMotorEncoder[motorleft] = 0;
nMotorEncoder[motorright] = 0;
while
(nMotorEncoder[motorleft] > -3700)
{
motor[motorleft] = -60;
motor[motorright] = 60;
}
nMotorEncoder[motorleft] = 0;
nMotorEncoder[motorright] = 0;
while
(nMotorEncoder[motorleft] > -270)
{
motor[motorleft] = -60;
motor[motorright] = -60;
}
servo[pullarm] = 255;
nMotorEncoder[motorleft] = 0;
nMotorEncoder[motorright] = 0;
while (nMotorEncoder[motorleft] < 9000)
{
motor[motorleft] = 75;
motor[motorright] = 75;
motor[upperlift] = 50;
}
nMotorEncoder[motorleft] = 0;
nMotorEncoder[motorright] = 0;
while
(nMotorEncoder[motorleft] < 3200)
{
motor[motorleft] = 75;
motor[motorright] = 0;
}
nMotorEncoder[motorleft] = 0;
nMotorEncoder[motorright] = 0;
while (nMotorEncoder[motorleft] < 8000)
{
motor[motorleft] = 75;
motor[motorright] = 75;
motor[upperlift] = 50;
}
}
#pragma config(Hubs, S1, HTMotor, HTMotor, HTMotor, none)
#pragma config(Hubs, S2, HTServo, none, none, none)
#pragma config(Sensor, S3, IRSensor, sensorHiTechnicIRSeeker1200)
#pragma config(Motor, mtr_S1_C1_1, motorleft, tmotorTetrix, openLoop, reversed, driveLeft, encoder)
#pragma config(Motor, mtr_S1_C1_2, motorright, tmotorTetrix, openLoop, driveRight, encoder)
#pragma config(Motor, mtr_S1_C2_1, upperlift, tmotorTetrix, openLoop)
#pragma config(Motor, mtr_S1_C2_2, sweeping, tmotorTetrix, openLoop, reversed)
#pragma config(Motor, mtr_S1_C3_1, lowerlift, tmotorTetrix, openLoop)
#pragma config(Motor, mtr_S1_C3_2, arm, tmotorTetrix, openLoop, encoder)
#pragma config(Servo, srvo_S2_C1_1, pullarm, tServoStandard)
#pragma config(Servo, srvo_S2_C1_2, cylinder, tServoStandard)
#pragma config(Servo, srvo_S2_C1_3, servo3, tServoNone)
#pragma config(Servo, srvo_S2_C1_4, servo4, tServoNone)
#pragma config(Servo, srvo_S2_C1_5, servo5, tServoNone)
#pragma config(Servo, srvo_S2_C1_6, servo6, tServoNone)
task main()
{
nMotorEncoder[motorleft] = 0;
nMotorEncoder[motorright] = 0;
while (nMotorEncoder[motorleft] < 10000)
{
motor[motorleft] = 75;
motor[motorright] = 75;
motor[upperlift] = 50;
}
nMotorEncoder[motorleft] = 0;
nMotorEncoder[motorright] = 0;
while
(nMotorEncoder[motorleft] < 1200)
{
motor[motorleft] = 75;
motor[motorright] = 0;
}
nMotorEncoder[motorleft] = 0;
nMotorEncoder[motorright] = 0;
while
(nMotorEncoder[motorleft] < 8000)
{
motor[motorleft] = 60;
motor[motorright] = 60;
}
nMotorEncoder[motorleft] = 0;
nMotorEncoder[motorright] = 0;
while
(nMotorEncoder[motorleft] > -270)
{
motor[motorleft] = -60;
motor[motorright] = -60;
}
motor[motorleft] = 0;
motor[motorright] = 0;
wait10Msec(100);
servo[cylinder] = 225;
nMotorEncoder[motorleft] = 0;
nMotorEncoder[motorright] = 0;
while
(nMotorEncoder[motorleft] > -3700)
{
motor[motorleft] = -60;
motor[motorright] = 60;
}
nMotorEncoder[motorleft] = 0;
nMotorEncoder[motorright] = 0;
while
(nMotorEncoder[motorleft] > -270)
{
motor[motorleft] = -60;
motor[motorright] = -60;
}
servo[pullarm] = 255;
nMotorEncoder[motorleft] = 0;
nMotorEncoder[motorright] = 0;
while (nMotorEncoder[motorleft] < 9000)
{
motor[motorleft] = 75;
motor[motorright] = 75;
motor[upperlift] = 50;
}
nMotorEncoder[motorleft] = 0;
nMotorEncoder[motorright] = 0;
while
(nMotorEncoder[motorleft] < 3200)
{
motor[motorleft] = 75;
motor[motorright] = 0;
}
nMotorEncoder[motorleft] = 0;
nMotorEncoder[motorright] = 0;
while (nMotorEncoder[motorleft] < 8000)
{
motor[motorleft] = 75;
motor[motorright] = 75;
motor[upperlift] = 50;
}
}