Yield() - The Yield Command
Dynalite devices use single threaded processors. So although they seem to run multiple tasks and processes at the same time they are actually switching quickly between them and only processing one thing at a time. The Yield() command tells a device that it can go process something else and come back to this task. Entering a Delay() command also yields to other processes.
Generally you do not need to add yield commands. Delays to prevent message collisions tend to create enough of a buffer to prevent even the longest tasks from capitalizing too much processing time. |
Syntax
Yield(x)
Where x is the duration in seconds you want the task to yield to other tasks.
The Send4 command will not refresh an OLED screen until after the next Yield() command. |