Go Down

Topic: Arduino supporting a timer tick thread (Read 583 times) previous topic - next topic

prairiemystic


I'd like to ask the Arduino support a timer tick thread

We presently have:

loop() {
}


I ask for i.e.

ticks {
 Gets run every say 1msec or 10msec.
}


It would have to be on the newer MCU's that have a free timer, maybe the 328PB and ARM.

Love to see Arduino programming go to the next level, past this one "big loop" which is very limiting.

Kid's robot crashes into a wall because "big loop" wasn't polling things at the right time.

AWOL

Love to see Arduino programming go to the next level, past this one "big loop" which is very limiting.

Kid's robot crashes into a wall because "big loop" wasn't polling things at the right time.

Is that the real reason, or was the code liberally seasoned with blocking constructs?
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.
I speak for myself, not Arduino.

prairiemystic

That example was actually a science student project. Let's do a state-machine with polling, busy-waiting and expect real-time response lol.

Is there any agreement the Arduino F/W architecture needs to move beyond a single thread, the "big loop"?


AWOL

Is there any agreement the Arduino F/W architecture needs to move beyond a single thread, the "big loop"?
From me? No, not really.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.
I speak for myself, not Arduino.

pert

Couldn't this be done / isn't this already possible via a library?

Go Up