FSM perform in sequence or randomly

Dear forum members,

I have a question regarding FSM I request all to respond if anyone's knows the solution of my question.

Question : FSM work in sequence or randomly .

Example 4 push button are available to perform some job.so if I press pushbutton no 2 to perform some job then pushbutton no 4 to perform some other job.will it work?

Or I can only perform all job sequencely by pressing pushbutton 1 then pushbutton 2 then pushbutton 3 like wise in sequence.

Sorry for English ..im not very good in English

Thanks.

Ronni12: Question : FSM work in sequence or randomly .

yes

you can program it any way you like

Thanks bulldogLowell.

I will try today to make it work randomly and I will update you .

Thanks again.

Hi, Welcome to the forum.

Please read the first post in any forum entitled how to use this forum. http://forum.arduino.cc/index.php/topic,148850.0.html

What is FSM?

Thanks.. Tom.. :)

I think you need to give a lot more details.

Statemachines work a sequence; that sequence can be influenced by factors like button presses, timings etc or the sequence can be fixed.

Here is a relevant FSM tutorial (Google translate is your friend):

http://forum.arduino.cc/index.php?topic=470879.0

Thanks Tom and sterretje,

For your reply.

I am planning to using 4 button to glow 4 different led like red led , blue led , green led, voilet led.

I want to knw without fixing sequence . can i use this 4 button in FSM to glow any led at any time without any sequence.

Finite state machince.

Thanks

'Glow' meaning fading in and out? Should it be possible to 'glow' two or more at the same time; if so, you need a statemachine for each led.

Ronni12: Thanks Tom and sterretje,

For your reply.

I am planning to using 4 button to glow 4 different led like red led , blue led , green led, voilet led.

I want to knw without fixing sequence . can i use this 4 button in FSM to glow any led at any time without any sequence.

Finite state machince.

Thanks

What FSM? You've showed us no code so far. You can do anything you want, but you have to break that down in a set of events and transitions to code up a state machine. It sounds like you will need to choose a state dependent on a call to random for this example.