Project Video
Design Statements
Project Need Statement
        Program a robot capable of traversing the laid out path as well as pick up and drop an object. The Design faze of the build was predetermined as to focus solely on programming the robot.
Project Solution Statement
The robot was programmed to drive along the path through a program called Robot C. Due to the fluctuation of battery life and the bending of wheel axles, the robot did not always drive the way it was programmed to do.

Constraints and Criteria
Constraints List
                                 -Position the robot on the home base.
                                 -Robot automatically maneuvers through the maze from start point to goal.
                                 -Robot does not drop into the abyss surrounding the abyss
                                 -Robot picks up the “hazardous material”.
                                 -Robot drops the “hazardous material” into the abyss.
Criteria List
                                 -Navigate the path without running over the boundaries.
                                 -Smoothly pick up and drop object into the abyss.
                                 -All functions programmed on the robot work as planned.

System Code with Comments
#pragma config(Sensor, dgtl1,  shaft,          sensorQuadEncoder)
#pragma config(Motor,  port1,           LeftM,         tmotorVex393_HBridge, openLoop)
#pragma config(Motor,  port2,           ser,           tmotorServoStandard, openLoop)
#pragma config(Motor,  port3,            ,             tmotorVex393_MC29, openLoop)
#pragma config(Motor,  port10,          RightM,        tmotorVex393_HBridge, openLoop)
//*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//
task main()
{
setServo(ser, 127);
startMotor(LeftM, -50);
startMotor(RightM, 50);
untilEncoderCounts(1080, dgtl1);
stopMotor(LeftM);
stopMotor(RightM);

startMotor(LeftM,   50);
startMotor(RightM,  50);
untilEncoderCounts(220, dgtl1);
stopMotor(LeftM);
stopMotor(RightM);

startMotor(LeftM, -50);
startMotor(RightM, 50);
untilEncoderCounts(780, dgtl1);
stopMotor(LeftM);
stopMotor(RightM);

startMotor(LeftM,   50);
startMotor(RightM,  50);
  untilEncoderCounts(220, dgtl1);
stopMotor(LeftM);
stopMotor(RightM);

startMotor(LeftM, -50);
startMotor(RightM, 50);
untilEncoderCounts(390, dgtl1);
stopMotor(LeftM);
stopMotor(RightM);

startMotor(LeftM,   50);
startMotor(RightM,  50);
untilEncoderCounts(220, dgtl1);
stopMotor(LeftM);
stopMotor(RightM);

startMotor(LeftM, -50);
startMotor(RightM, 50);
wait(0.9);
stopMotor(LeftM);
stopMotor(RightM);

startMotor(LeftM,   50);
startMotor(RightM,  50);
untilEncoderCounts(200, dgtl1);
stopMotor(LeftM);
stopMotor(RightM);

startMotor(LeftM, 50);
startMotor(RightM, -50);
wait(390);
stopMotor(LeftM);
stopMotor(RightM);

startMotor(LeftM,   50);
startMotor(RightM,  50);
untilEncoderCounts(220, dgtl1);
stopMotor(LeftM);
stopMotor(RightM);

startMotor(LeftM, 50);
startMotor(RightM, -50);
wait(1);
stopMotor(LeftM);
stopMotor(RightM);

startMotor(LeftM,   50);
startMotor(RightM,  50);
untilEncoderCounts(220, dgtl1);
stopMotor(LeftM);
stopMotor(RightM);
setServo(ser, 0);

startMotor(LeftM,   -50);
startMotor(RightM,  50);
wait(0.2);
stopMotor(LeftM);
stopMotor(RightM);

setServo(ser, 127);
wait(0.5);
}

You may also like