phi_prompt with task scheduling?

I'm using liudr's excellent phi_prompt + phi_interfaces to create menus on my project.

I'm measuring and displaying current and ampere hours in one menu, air temperature and barometric pressure on another, and simultaneously want to control the brightness of a LED.

As the arduino won't multitask, I need to have some sort of scheduling of the tasks so they all get serviced. Early in the project I tried using an interrupt, but it didn't work - I suspect that it interfered with the LCD timing.

There appear to be several libraries available to carry out scheduling, all with varying degrees of sophistication and fairly steep learning curves for someone with limited programming abilities like myself!

Can anyone offer any suggestions, please? The timing doesn't need to be very accurate.

Jim

My state machine library supports concurrent state machines. It could be a solution. You can fins it here: http://playground.arduino.cc/Code/SMlib I would be glad to learn the phi_promt as well, New to me but looks very useful. So PM me id you want to collaborate.

nilton61:
My state machine library supports concurrent state machines. It could be a solution.
You can fins it here: http://playground.arduino.cc/Code/SMlib

Thanks for the reply.

I’ve had a look at the link and it’s pretty much beyond me at the moment - I’ll have to digest it and experiment with it! I should add that I’m just a hobbyist and have no formal education in programming. I can code, but the last chapters in programming books that are generally entitled ‘Advanced Topics’ I struggle with. Unfortunately most of the useful stuff is usually covered by the 'Advanced Topics!

I would be glad to learn the phi_promt as well, New to me but looks very useful. So PM me id you want to collaborate.

Here is the link to Dr Liu’s (liudr) blog describing his ‘phi’ libraries.

A big plus for me that enabled me to get started, is the excellent documentation he’s written to accompany the libraries. I’d suggest that if you can write a state machine library, you’ll have no problem with the phi libraries - and I certainly wouldn’t be of much assistance at my low level of understanding!

Jim

Send me your code and a description how it is meant to work and ill see if its adaptable to a state machine.

nilton61: Send me your code and a description how it is meant to work and ill see if its adaptable to a state machine.

Thanks a lot for the offer!

My project has grown quite big and isn't pretty! What I might do is fork off a cut-down version that's more manageable in a 'proof of concept' use of your state machine library (when I can understand it better!). If I get stuck - and I probably will - I'll come back to you fo help.

Do you have any more documentation or examples than those in the SM.zip file, that I can study, please?

Jim

Yes i have. Email me and i'' send them to you