Help finishing State Machine Code

See this example:
https://forum.arduino.cc/index.php?topic=525240.0