Our hierarchical state machines (HSMs) serve as the brains of our game, informing us how to play the game and what steps we should take in order to achieve a certain task. THey send events to the LeaderFSM, which then process these events into tangible actions down the pipeline as you will see further below. These HSMs are programmed within the Leader PIC.
To sense the presence of an IR beacon tree, we implemented a flying fish IR sensor with a range of 30 cm. To theen read the frequency of the emitted IR light, a custom buuilt signal condition circuit with a phototransistor was implemented. An input captturre recognized riising edges to obtain the corresponding frequency. Additionally, an LED was used with a digital output to indicate the game mode.
We opted for a one leader, two follower scheme for our SPI communications as a means of 1) easily partitioning functionality (Follower1 - DC motors, Follower2 – servo motors) and 2) having the flexibililty to move components to different pins, avoiding running out of output compare/input capture registers, etc.
Takes events from the aforementioned HSMs and translates them into commands that the two follower PICs can interpret. In essence, it is the bridge between the brain of the gameplay and the lower level functionalities carried out by the followers. The state diagram below demonstrates the general architecture of our SPI communications system:
Takes commands from the LeaderFSM via SPI and relays it to the DriveService.
Allows for forward/backward drive, and CW/CCW rotation.
Takes commands from the LeaderFSM via SPI and relays it to TeamService, ScoopService, and LaunchService, all of which control servos in the robot.
Consists of two servos: a push servo and a pull servo that work together to actuate a slip gear puncher. Our initial design included just one (pull) servo to actuate the slip gear, but we realized late that while the servo had 360 degree control, it was not continuous. Thus, we needed another (push) servo to allow for the pull servo to properly wind and reset for a launch.
Indicates which YARD we are on.
Holds the ACORN in place as the robot rotates until it senses a beacon.