Concept Flow - Vending machine FSM example
Start: Idle State
Wait for Coin
Coin Inserted?
No→Stay Idle
Yes
Update Credit
Credit >= Price?
No→Wait for More Coins
Yes
Dispense Item
Return Change if any
Reset Credit
Back to Idle
The vending machine waits for coins, updates credit, checks if enough money is inserted, dispenses item, returns change, then resets to idle.
