#include <Taskfun.h>
void loop2(int) {
while (true) {
// do stuff in parallel with other loops
// for example play song
Serial.print(__func__);
delay(1000);
}
}
void loop3(int) {
while (true) {
// do stuff in parallel with other loops
// for example draw the game screen
Serial.print(__func__);
delay(1000);
}
}
void setup() {
Serial.begin(115200);
runTask(loop2,0);
runTask(loop3,0);
}
void loop() {
// do stuff in parallel with other loops
// for example read input from joystick and buttons
Serial.print(__func__);
delay(1000);
}