State Machine Control via the Putty Console - stm32