Control a coffee machine via a 5-state machine: Idle, Heating, Grinding, Brewing, and Ready.
| Name | Type | Usage | Description |
|---|---|---|---|
| In_StartButton | BOOL | Input | Input to start the coffee machine process. |
| In_ResetButton | BOOL | Input | Input to reset the machine to Idle state and clear all outputs. |
| In_WaterHeated | BOOL | Input | Indicates the water heating process is complete. |
| In_GrindDone | BOOL | Input | Indicates the coffee grinding process is complete. |
| In_BrewDone | BOOL | Input | Indicates the coffee brewing process is complete. |
| Out_WaterHeating | BOOL | Output | 1 when the machine is heating water. |
| Out_GrinderRunning | BOOL | Output | 1 when the grinder is running. |
| Out_Brewing | BOOL | Output | 1 when the machine is brewing coffee. |
| Out_CoffeeReady | BOOL | Output | 1 when the coffee is ready. |
Open this exercise in Rungs Studio, write your solution, then click Test in the toolbar to verify your work against the built-in test cases.