ME 218a: Money Talks
  • Home
  • Project Overview
  • Team
  • Design
    • Mechanical
    • Electrical
    • Software
  • BOM
  • Photos/Videos
  • Gems of Wisdom

Software Design


Below, you will find the pseudo-code and actual C code from our project.  If you can't open the files directly, you can save them to your computer and open them in any standard text editor.  You can also download the complete pseudocode and source code at the bottom of the page.

We approached the software design process by creating modules for every distinct input and output needed to play our game.  Therefore all the modules (except main) are independent of each other.  The main module is responsible for implementing the game by calling the other modules when needed.
  • Main: pseudocode, implementation
This module coordinates all the inputs, outputs, and the game module.  We use a state machine architecture to respond to events.
  • Ballot motor: pseudocode, header, implementation
This module controls the $100 bill stack motor.  The motor is activated to return the bill stack to its initial position.
  • Ballot sensor: pseudocode, header, implementation
This module senses when the $100 bill stack breaks the IR LED/phototransistor signal plane.
  • Bank servos: pseudocode, header, implementation
This module controls the servomotors that indicate each player's current bank level.
  • Card sensor: pseudocode, header, implementation
This module controls the CdS card sensor, which determines which color card has been inserted.
  • Clock servo: pseudocode, header, implementation
This module controls the servomotor that indicates the remaining time in the game.
  • Fan: pseudocode, header, implementation
This module controls the fans that blow the color cards out of their holders.
  • Game: pseudocode, header, implementation
This module stores all relevant game play data and returns it when called.
  • LED: pseudocode, header, implementation
This module controls the flashing of the LEDs.  We use a state machine architecture to implement different blink rates with a shift register.
  • Potentiometer: pseudocode, header, implementation
This module controls the potentiometer levers that allow each player to set a money amount to send.
  • Region buttons: pseudocode, header, implementation
This module controls the region buttons, allowing each player to send money to any region.
  • Vibrate motor: pseudocode, header, implementation
This module controls the vibrate motor which provides tactile feedback on illegal player actions.
completepseudocode.zip
File Size: 7 kb
File Type: zip
Download File

completesourcecode.zip
File Size: 20 kb
File Type: zip
Download File

Create a free web site with Weebly
  • Home
  • Project Overview
  • Team
  • Design
    • Mechanical
    • Electrical
    • Software
  • BOM
  • Photos/Videos
  • Gems of Wisdom