A simple example. In some carwash installations you have to position your car. Mostly by optical signs, it is possible to get your car into the right place. What I/O is needed for this situation; an ultrasonic device to measure distance and 3 LED’s; blue for “in front”, green for “in place” and red for “get back!”, a servo for the carwash door.

The configurator:
(add a new I/O point; “Door” PWM pin 2)

Below the presentation of the FSM (that’s all you have to do for this one….). There are 3 states; START, Wash and Ready.

Build and upload the sketch now for the given configuration and sketch.

… is it actual working…?

Part of the HMI is also the plotter for 3 signals max. Below the plotter with the I/O of the color LED: