Hello. I've been trying to use the IntervalTimer library to manage the "main timing" functionality of a voltage sequencer im designing. The question I have is basically about how this library works.
It looks like I can't use the begin function inside of the main loop. This is kida confusing to me cause if its not posible to initialize the timer inside the loop, how is the .end() function usable for freeing a timer in order to use it for another object? This might be a dumb question but I can't find more documentation/information than the one I already have. This is an example of what I tested.
As you can see I make the .begin() function to run one time.
void loop()
if(first){
main_timer.begin(tim, t);
analogWrite(pin_CV, round(sequence));
}else{
first = 0;
analogWrite(pin_CV, round(sequence));
}
Thanks in advanced.
It looks like I can't use the begin function inside of the main loop. This is kida confusing to me cause if its not posible to initialize the timer inside the loop, how is the .end() function usable for freeing a timer in order to use it for another object? This might be a dumb question but I can't find more documentation/information than the one I already have. This is an example of what I tested.
As you can see I make the .begin() function to run one time.
void loop()
if(first){
main_timer.begin(tim, t);
analogWrite(pin_CV, round(sequence));
}else{
first = 0;
analogWrite(pin_CV, round(sequence));
}
Thanks in advanced.