Question: You need to design a vending machine controller that should exhibit the following behavior: The vending machine delivers a package of gum after it has
You need to design a vending machine controller that should exhibit the following behavior:
The vending machine delivers a package of gum after it has received cents in coins.
The machine has a single coin slot that accepts only nickels cents and dimes cents one coin at a time.
A sensor indicates to the controller whether a nickel or dime has been inserted in the coin slot.
The controllers output causes a single package of gum to be released when it has received at least cents, and the controller is reset.
The machine does not give change. For example, if two dimes are inserted, it will release the gum and reset. Write the embedded C code to implement the same
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
