Code

 Competitions

Individual Competition

    Final Competition    

 

 Performance Tests

Performance Test 1

Performance Test 2

Performance Test 3

Performance Test 4

 

Definitions

Power

Sets the power level (in volts) for the IGWAN motors.

Movement Percentages

Sets the motor speed while the robot is moving forward and backwards.

Turning Percentages

Sets the motor speed while the robot is turning left and right.

Internal Adjustments

Adjusts the times of each sleep statement to get desired distance/angle.

Times

Defines common times for sleep statements.

Servo Motors

Sets starting and finishing servo motor positions.

Starting Position

Sets x, y, and heading values for robot in the starting area.

RPS Timing

Sets the maximum time for an RPS check to take.

 

Functions

main

Asks user which course should be run, runs the course, and asks for user input regarding performance.

startUp

Asks user whether motors should be checked and initializes the screen.

checkMotors

Checks to see if the motors are functional.

showInfo

Displays the current RPS information from the robot.

turnRight

Turns to a specified angle.

ask

Asks the user a yes or no question. 

readyStart

Looks for the starting light to turn on.

turnFuel

Turns the crank based on the fuel type.

runCourse

Runs the specified course.

setFuel

Sets the angle of the servo motor based on the fuel type.

isBlue

Reads the color of the diagnostic light.

pressButton

Contains the path to press the correct button based on the value read in.

moveForward

Moves forward a specified distance at a certain speed.

abs

Makes negative values positive.

moveToY

Moves the robot to a y-coordinate using RPS checks.

turnTo

Turns the robot to a specific direction using RPS.

moveToX

Moves the robot to an x-coordinate using RPS checks.