- keypad is an XBus input connected to a keypad.
- bread, meat, cheese, and mustard are simple outputs connected to mechanisms that dispense those ingredients.
- flag is a simple output connected to a motor that raises and lowers a small American flag when a sandwich is complete.
- When a value is available from the keypad, read it and dispense a sandwich using the information in the following table and the verification tab:
1
|
SANDWICH TIME!
|
dispense a sandwich with meat, cheese, and mustard
|
2
|
HOLD THE CHEESE
|
dispense a sandwich but don’t add cheese
|
3
|
EXTRA MUSTARD
|
dispense a sandwich with extra mustard
|
|