State machine comparision

J-M-L:
as quick feedback on this

// the possible states of the state-machine

typedef enum {
  STATE_BEGIN_INPUT,
  STATE_GETTING_ROTATION,
  STATE_GETTING_SPEED,
  STATE_OUTPUT_RS} states;




- `typedef` is no longer needed.

It won't compile if it is not there.