Finite State Machine Using Switch Statement.

Hi

I fully agree to the previous post. Additionally i can give some examples including state diagram and code.

My none-Arduino project to drive several power LEDs includes the user interface as state machine here GitHub - olikraus/tinyledlight: Automatically exported from code.google.com/p/tinyledlight. The state machine is implemented with switch case statements and is available here: GitHub - olikraus/tinyledlight: Automatically exported from code.google.com/p/tinyledlight

State machine for a rotary encoder software, part of m2tklib for Arduino. Sketch and state diagram are available here: Google Code Archive - Long-term storage for Google Code Project Hosting.. The state machine is implemented as "next step" lookup table.

Oliver