Examples of QM Graphical state machine modeling and code generation

I've been learning about the superiority of state machines for micro controllers. I think that this QM tool for Arduino might be the ticket. However, the examples given don't cover the basic suite of Arduino tasks. For example, the modular state machine approach lends itself well to adding a LCD user interface to an existing data measurement task. I wonder if anyone has made a Arduino QM model, and could share it here as a learning tool.

If you are wondering about state machines:

http://playground.arduino.cc/Code/QP

I've looked at QM a few times over the years, I do like the idea but haven't had time to play with it yet. I always try to have stuff running with interrupts in the background anyway.

I guess it would be hard to totally let go of the procedural model and go 100% state machine, still it's hierarchical so I guess you could define a "loop" SM and still do some stuff the old way in that.

I to would like to hear of anyone that has practical experience with QM on Arduino (or any other embedded system I suppose).


Rob

Some QP examples are available from:

I can't see anything there really, just links back to state-machine.com and his git repo.

Browsing the source code was interesting though, it seems to grab the TIMER2_COMPA interrupt and do a stack of tests for buttons being pressed then raise events if they are.

One thing I don't get is that apart from setup() there appears to be no hand-written code in the entire project, it's all generated by QP. How does that work? Surely at some point a human has to write code that deals directly with the hardware and/or applies algorithms to data to make decisions.


Rob

Hi,

i need to find the qp_arduino_4.3.00.zip. But i cannot find it on sourceforge/google...

can someone please upload it for me?

Thanks a lot!!!

Pcace

I reckon you would have your project written in the time it takes to figure out how the library works and your own code would be much easier to debug.

You can implement a state machine with simple code.

...R

Hmm
this is really not what i was looking for. Is noone here who would upload the older version for me?

Thanks

Pcace

Sorry, I hadn't realized this was not a continuous discussion.

...R

Hmm but is here really noone who could send me the qp_arduino_4.3.00.zip lib??

Please!!

Thanks,

Pcace