Home | Notes | Projects > ARM-Assembly Vending Machine

ARM-Assembly Vending Machine

 

Introduction

An ARM assembly program to simulate a soft drink vending machine using Raspberry Pi board, buttons and LEDs

 

Objective

 

Development Environment

 

arm-assembly-vending-machine

 

 

Specification

Basic Functionality

The machine will dispense, upon receipt of the correct amount of change of 55 cents, a choice of Coke, Sprite, Dr. Pepper, or Coke Zero. Your software will perform the following:

  1. Display a welcome message and instructions.

  2. Accept money inputs of nickels (N), dimes (D), quarters (Q), and one-dollar bills (B).

  3. Reject any invalid money inputs.

  4. Set the initial inventory of drinks to two of each kind.

  5. Once the money input is 55 cents or greater prompt the user on what soft drink they want. (C) Coke, (S) Sprite, (P) Dr. Pepper, or (Z) Coke Zero

  6. Verify with the user what drink they selected and allow them to cancel that selection and be prompted for another drink selection.

  7. Reject any invalid soft drink selections.

  8. There should also be an option to cancel the transaction and return any money deposited by the user.

  9. If the user selects an out of inventory drink prompt them to make another selection.

  10. Dispense the selected drink and any change due.

  11. Drink machine will shut down when the entire inventory reaches zero.

  12. Assume there is no limit on the amount of change the drink machine contains.

  13. Make provisions for a secret code that when entered will display the current inventory of drinks. For grading purposes identify the secret code and when it can be entered in the welcome message.

Usage of LEDs

Usage of Buttons

 

Source Code