Is there a way to use the Scheduler library?
Would be great to have multiple tasks/loops running.
(it would be also great to have priorities too)
original source on github
Example use:
#include <Scheduler.h>
int counter = 0;
int counter1 = 0;
void setup()
{
Scheduler.startLoop(loop1);
}
void loop () {
analogWrite(9, counter);
counter++;
if (counter > 255){
counter = 0;
}
delay(33);
}
void loop1 () {
analogWrite(10, counter1);
counter1=counter1+5;
if (counter1 > 255){
counter1 = 0;
}
delay(10);
yield();
}
Do tasks do what you need? You can access them from the arduino environment.
wow great - did not know, that it is accessible within arduino environment.
So Maybe I build my own helper class and using xTaskCreate and vTaskDelay
@Jorgen-VikingGod :
Did not look into it yet so this is not a comment on usability and/or quality.
https://github.com/michaelbecker/freertos-addons
I made a little example of multiples loops , check this out: https://github.com/copercini/esp32-iot-examples/blob/master/multiloop/multiloop.ino
Since the arduino core run over FreeRTOS and you can call the APIs directly in the Arduino sketch, it's not necessary an additional library
Most helpful comment
I made a little example of multiples loops , check this out: https://github.com/copercini/esp32-iot-examples/blob/master/multiloop/multiloop.ino