Simple task scheduler for microcontroller