Simple Scheduler

I want to do a simple scheduler like below. I'm new to Arduino and C but done some assembly and Forth.

I have looked through the help files but haven't found anything yet. I'm not ready for a fully blown RTOS yet, just something simple for now.

Any suggestions ? fiddler //+++++++++++++

void Main(); GoTo Task_1; GoTo Task_2; GoTo Task_3; GoTo Main;

Task_1; return

Task_2; return

Task_3; return

void setup(){
}

void loop(){
function1();
function2();
function3();
}

function1(){
//code
}
function2(){
//code
}
function3(){
//code
}

Look at Protothreads.

Cool

Thanks

fiddler

You might also want to look at Metro: http://www.arduino.cc/playground/Code/Metro

Another option might be the event fuse library http://www.arduino.cc/playground/Code/EventFuse.