NXC
Version 1.2.1 r5
Main Page
Related Pages
Modules
Data Structures
Files
Examples
All
Data Structures
Files
Functions
Variables
Groups
Pages
ex_yield.nxc
This is an example of how to use the
Yield
function.
task play() {
while
(
true
) {
PlayTone
(
TONE_A4
,
MS_500
);
Wait
(
SEC_1
);
}
}
task drive()
{
while
(
true
) {
OnFwd
(
OUT_A
, 50);
Yield
();
}
}
task main()
{
Precedes
(drive, play);
}
Generated by
1.8.2