Actually, I want to make the tracker , update its position in a discrete mode, each 20 minutes for 1 minute or less and in between the arduino will serve as a part of my PWM charge controller.
If you have any Suggestions, you are welcome , again, thank you for your help.
Under normal operating conditions you'd create non-blocking 'tasks' which all run within the loop at the same time. Or at least within the same millisecond, or perhaps a few milliseconds. Forbidden in your programming is:
- delay() of any kind
- busy waiting loops of any kind
All functions have to be fully "cooperative" and "non-blocking".
If all the inputs and outputs of the different tasks are independent from other tasks, you possibly might have a simple round-robin-scheduling like possibly that:
And if it's more complicated and the same inputs have consequences on the outputs of different tasks, or if inputs from several tasks have consequences on the output of one task, then possibly the programming logic might look like:
The more interaction your different tasks need, the more sophisticated programming will be needed in your sketch to create a smooth running "cooperative multitasking".