Ball Manager System
2 Independent Belt Systems, 2 Banner Prox Sensors, 1 Color Sensor
Github
BallManager.java Indexer.java
Our indexer runs the lower portion at a much faster speed than the upper belt such that we can quickly get the ball into the tower and then carefully control the ball path. In order to achieve this functionality, we employed a REV color sensor and a photoelectric proximity sensor. We used the color sensor’s proximity sensing for lower ball position and the photoelectric sensor to track the position of the ball in the upper level of the tower. Using the data from both sensors, we could index the cargo at a certain speed to ensure that each ball can be consistently shot. This gives us a count of the number of balls in the tower, which is also used to automatically retract the intake when the maximum capacity is reached.
Scoring the wrong color cargo gives points to the opposing alliance, so we determined that we needed a way to prevent this from occurring. To do this, we use the color sensor to compare the alliance color with the ball color as it enters the indexer and reverse the direction of the motors if it is the wrong color. Though the process itself was simple, it took a great deal of testing to determine at which speeds to properly reject the ball in order to only eject the singular ball and not the whole tower. All of the indexing is done automatically, the only thing the driver has to do is press a button to deploy the intake, and then the software handles it from there.

