Frederic introduced a nice little state machine for serial communication.