I wannt to set a value for two seconds and after two seconds I wannt to set the value to Zero the next two seconds and continue… . I tryied to used Ticker for this Purpose but it does not work. Could you have any Suggestion or idea?
I would just use one Ticker and flip the value in the callback like this.
void flip() {
static bool flag = false;
ManVal1 = flag ? 0 : 25; // 0 or 25 depending on the flag
flag = !flag; // flip flag
queue->call(&userContext); // defer the execution to a different context
}
I flip flag which is bool. And set a value depending on the state of flag.