Hi, I would think this application is ideal as a state machine.
https://www.arduino.cc/en/Reference/SwitchCase
Tom...