Tell me what you want, What you really, really want.

Moderator: Mmiscool

User avatar
By Pradeep
#50485 Hi
I am extremely happy with ESP BASIC development.

Can we run more than one timer at the same time to carryout two different tasks?

Thanks
Pradeep
User avatar
By Oldbod
#51649 Did you come to a happy conclusion about this? I'd probably assume that it was possible to add a second timer command (eg timer2) to basic pretty easily, a little more complex to add a multitimer function (like timer(n,1000) ). You just have to avoid unwanted interference.

But you can add the same functionality yourself pretty easily. one way, you set the timer function to a convenient value, something equal to or less (say half for instance) than the minimum value you'll actually need. Then in your timer called subroutine, you check to see if it's time to do whatever you want to do for each item. There are many ways to do that, and as long as you're not trying to do too much for the processor keep up, you'll be fine. And because you've got control, you can avoid unwanted triggers....
User avatar
By Mmiscool
#51664 I think i could add more timerers pretty easly.

If i dont add more in the next build please reminde me.