-
I'd like to drive a servo using TaskManager but am having a hard time conceptualizing how to translate my code. My current control code is below:
How could I approach this with TaskManagerIO? |
Beta Was this translation helpful? Give feedback.
Answered by
davetcc
Aug 7, 2023
Replies: 1 comment 2 replies
-
Hi there the easiest way to achieve that is to schedule something once and use a counter to count down. ie the idea would be you have a function that reschedules itself until the condition is met. A bit like setTimeout in JavaScript. We do this quite a bit in tcMenu. [EDIT] correct auto-correct spelling |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here's the common pattern for that case, its used quite a bit in TcMenu and elsewhere: