How did it work?
At the beginning of the game, our bot starts out pointing towards one of the four beacons from which it determines its color. It then boisterously pops the balloon of the opposite color. From there it turns its ball collecting motor on and goes into a ball collecting state, in which it meanders back and forth across the playing field turning around every time it comes close to a wall. A ball counting circuit (consisting of an IR diode and phototransistor) keeps track of how many balls are collected. Every 15 seconds, the bot checks how many balls it has, and if the number exceeds some specified amount it searches for an available bin to deposit the balls in. An available bin is defined as a bin on the bot's side and can be identified by querying the angle of the rotating wall. The bot turns in place until the beacon is detected (using a phototransistor in a transresistive circuit along with other signal conditioning) and then drives forward until one of its Sharp IR sensors is triggered telling it that it has reached a wall. It then aligns with the beacon again and proceeds to follow the wall (using the Sharp IR closest to the wall and PI control) until its tape sensor is triggered signifying it has reached the tape in front of the bin. It then turns towards the bin, opens its front gate, and drops the balls into the bin. This process continues until the last 30 seconds of the game.
When a minute and a half has passed, the bot determines if it has balls to be deposited-- if it does, it goes through the process described above to deposit them and if not, it goes into a state we call wall pushing. In the wall pushing state the bot queries the number of balls in all of the bins to find the one that has the most balls. Then by a sequence of aligning with certain beacons and driving forward, the bot is able to push the wall until it reaches the desired wall angle signifying we have captured that bin.
When a minute and a half has passed, the bot determines if it has balls to be deposited-- if it does, it goes through the process described above to deposit them and if not, it goes into a state we call wall pushing. In the wall pushing state the bot queries the number of balls in all of the bins to find the one that has the most balls. Then by a sequence of aligning with certain beacons and driving forward, the bot is able to push the wall until it reaches the desired wall angle signifying we have captured that bin.