Embedded Systems Lecture Example Code for a Mealy Finite State Machine Implementation