Programming
Programming is a collaborative effort. With suggestions from our coaches and mentors, we have been able to develop our own method of confronting the problem of the complexity of older programs.
Techniques We Use
PID (Proportional-Integral-Derivative) Controller
Relatively advanced programming concept that we specifically use to follow lines
As a team, we have developed the following features to our PID controller over time.
Relatively advanced programming concept that we specifically use to follow lines
- P: creates proportional changes based on an error value and a variable
- I: accumulates error to fix for additional adjustment
- D: predicts and compensates for future errors beforehand
As a team, we have developed the following features to our PID controller over time.
1. Create the concept of a "Shift Constant" to be added onto one of the motors, as to allow the sensor to be placed off the center of the robot. This was developed this year by one of our members and allows for more access throughout the field.
2. Make four separate line following programs, with options on which sensor to use, as well as which side of the line to follow. These four programs were put into a single MyBlock in which we input which option for the robot to take.
3. Set up an input system in which the variables in the program can be easily changed. All of the PID controllers are in MyBlocks, and we found out how to easily change all the variables in the program quickly.
|
Squaring Up
We have three methods in which we can make our robot square up:
1. Use Color Sensors to square up on a line
2. Use Rotation Sensors to square up on a wall
3. Use Touch Sensors to square up on a wall
We have three methods in which we can make our robot square up:
1. Use Color Sensors to square up on a line
- In this program, each of the motor corresponds to a color sensor. The program starts with both motors moving, stopping once its respective color sensor senses the line. For extra accuracy, the robot moves forward a little bit, and repeats the process, this time moving backwards.
2. Use Rotation Sensors to square up on a wall
- This program utilizes the built in rotation sensors in the motors to tell when the robot has completely backed up against a wall. It uses two variables (set to false at the beginning) and checks periodically to see if the motor has stopped moving due to inability. Once both variables are true, the robot stops moving.
3. Use Touch Sensors to square up on a wall
- The third version of our robot, Tank, has touch sensors implemented in the back. Like the color sensor program, each touch sensor corresponds to a motor. Once each touch sensor has been pressed, each respective motor will lock
Additional Info
Using Sensors:
Version 2 of our robot, Brick, used an Ultrasonic Sensor incorporated into the back of the robot design. This allowed the robot to be constant in where it stopped. However, because of lack of use, the Ultrasonic Sensor was replaced by two Touch Sensors for Version 3, Tank. The touch sensors are used in the techniques mentioned above.
Handrails:
We try to use "handrails" (such as squaring up on walls, and following lines) as much as possible in missions to make our robot consistent and accurate in what it does. Handrails act as checkpoints in which the robot will certainly be in a certain location or orientation. This is important, because without accuracy, no points will be scored no matter how fast our robot is.
Version 2 of our robot, Brick, used an Ultrasonic Sensor incorporated into the back of the robot design. This allowed the robot to be constant in where it stopped. However, because of lack of use, the Ultrasonic Sensor was replaced by two Touch Sensors for Version 3, Tank. The touch sensors are used in the techniques mentioned above.
Handrails:
We try to use "handrails" (such as squaring up on walls, and following lines) as much as possible in missions to make our robot consistent and accurate in what it does. Handrails act as checkpoints in which the robot will certainly be in a certain location or orientation. This is important, because without accuracy, no points will be scored no matter how fast our robot is.