A vending machine simulating drink selection & payment via keyboard entries. More...
Functions | |
| def | ME405_Lab0x01.kb_cb (key) |
| Callback function which is called when a key has been pressed. | |
| def | ME405_Lab0x01.VendTask (denomDict) |
| Allows for the purchase of drinks with certain denominations. More... | |
Variables | |
| string | ME405_Lab0x01.last_key = '' |
| int | ME405_Lab0x01.WelcomeState = 0 |
| int | ME405_Lab0x01.DrinkNCoin = 1 |
| int | ME405_Lab0x01.ComputeVend = 2 |
| int | ME405_Lab0x01.Eject = 3 |
| dictionary | ME405_Lab0x01.denomDict |
| def | ME405_Lab0x01.getDrink = VendTask(denomDict) |
| Creates a generator object. More... | |
A vending machine simulating drink selection & payment via keyboard entries.
<B>source code:</B> https://bitbucket.org/nicho755/me-305-labs/src/master/ME405_Lab0x01_Vendotron/ME405_Lab0x01.py
| def ME405_Lab0x01.VendTask | ( | denomDict | ) |
Allows for the purchase of drinks with certain denominations.
Keyboard callbacks enable the user to select a desired drink and to pay for said drink from a fixed variety of denominations.
| denomDict | Lists the possible denominations, from largest to smallest, that the user can pay with. Their values are integers specified in dollar amounts. |
| dictionary ME405_Lab0x01.denomDict |
| def ME405_Lab0x01.getDrink = VendTask(denomDict) |
Creates a generator object.
Creating a generator object will allow us to iterate through this theoretically infinite sequence per cycle of the FSM.