Software Overview:
Our software code was exclusively designed to "beat the brick." We decided that we wanted to shoot for 2 point baskets, and that it would be a good idea to have our robot (Legolas) "reset" multiple times in 2 minutes to increase the probability that we would make at least one basket. We thought that, if the robot's original location was not accurate, that it would be more prudent/risk-adjusted to "break" the connection and reset with the basket again.
With this in mind, our robot made good use of timers and very simple external signals - one bumper on the front, and an IR sensor. We coded our bot to drive forward and hit the wall separating the two courts. After then, it performed an infinite loop of bumping against the BRB three times to request balls, and then strafing back and forth along the wall. The robot would stop to shoot if the IR was triggered; if not, then we calibrated the robot to stop where we expected the basket to be.
To shoot, we had three balls that were held behind a partition. This was controlled by a servo motor. Our balls would be shot by two flywheels - Lego wheels attached to motors. With regard to software, when the robot was in its "shooting state," the flywheels would be activated and the servo motor was timed to allow balls to be shot in 1sec increments. We found that the process of shooting actually took a significant amount of inertia away from the Lego wheels, and as a result, we needed to give the motor time to allow the wheels to return to full speed.
Our final code (used in the competition) can be found below:
With this in mind, our robot made good use of timers and very simple external signals - one bumper on the front, and an IR sensor. We coded our bot to drive forward and hit the wall separating the two courts. After then, it performed an infinite loop of bumping against the BRB three times to request balls, and then strafing back and forth along the wall. The robot would stop to shoot if the IR was triggered; if not, then we calibrated the robot to stop where we expected the basket to be.
To shoot, we had three balls that were held behind a partition. This was controlled by a servo motor. Our balls would be shot by two flywheels - Lego wheels attached to motors. With regard to software, when the robot was in its "shooting state," the flywheels would be activated and the servo motor was timed to allow balls to be shot in 1sec increments. We found that the process of shooting actually took a significant amount of inertia away from the Lego wheels, and as a result, we needed to give the motor time to allow the wheels to return to full speed.
Our final code (used in the competition) can be found below:

_150303_-_legolas_vfinal.zip | |
File Size: | 3 kb |
File Type: | zip |