sample code for a traffic light controller in embedded systems Finite State Machines lecture