Overview | Main | State Machine | Events | IR | Tape | Drivetrain | PWM | Flash | Two Minute Timer | Bump

.zip of Software (39.5kb)

The Death Star uses a modular software design divided up by functional groups. Its code is written in the C programming language, and is compiled for the E128 microprocessor using CodeWarrior.

The main module is responsible for initializing all of the subsystems and other modules and then running the event-driven state machine. The state machine module contains the “brain” of the robot. The events module regularly queries the low-level modules for changes in state, converting between a polling paradigm and an event-driven paradigm. The IR module coordinates the reading of the eight infrared sensors. The tape module coordinates the reading of the five tape sensors. The drivetrain module serves as an interface to the two drive wheels, and relies on the PWM module to control their speeds and directions. The flash module coordinates the reading of the flash sensor. The bump module coordinates the reading of the two bump sensors. The two-minute timer module allows the robot to keep track of the passage of time, so that it can stop after two-minutes as required by the project specification.