I have found in many places that finite state machine is useful tool to solve complex problems. But so far i've never needed FSM.
I have gone through wiki page https://en.m.wikipedia.org/wiki/State_diagram
But I do not understand how to use the FSM in embedded programming. I do not know what is the benefit of drawing state diagram.
I want to learn FSM how to create a state diagram but i don't know where to start.
Please suggest a simple way to create a state diagram