|
|
| Line 13: |
Line 13: |
| | <br /> | | <br /> |
| | | | |
| − | {| | + | {{tl|1|1}} |
| − | |-
| + | <br /> |
| − | |style="vertical-align:top"| __TOC__
| + | |
| − | |style="vertical-align:top"|
| + | |
| − | {| width="100" cellpadding="2" cellspacing="0" style="border-collapse: collapse; border-width: 1px; border-style: solid; border-color: #000"
| + | |
| − | !colspan="2" class="wikiHeader"|Color Key
| + | |
| − | |-
| + | |
| − | |class="wikiText" width="75%" style="border-style: solid; border-width: 1px 0px 0px 0px"|Function:
| + | |
| − | |width="25%" style="border-style: solid; border-width: 1px 0px 0px 0px;" class="colorKeyFunc"|
| + | |
| − | |-
| + | |
| − | |class="wikiText" width="75%" style="border-style: solid; border-width: 0px 0px 0px 0px"|Variable:
| + | |
| − | |width="25%" style="border-style: solid; border-width: 0px 0px 0px 0px;" class="colorKeyVar"|
| + | |
| − | |}
| + | |
| − | |-
| + | |
| − | |}
| + | |
| − | | + | |
| | | | |
| | == bPlaySounds == | | == bPlaySounds == |
| ROBOTC provides a comprehensive suite of functions for controlling an optional speaker connected to the first motor port on a VEX controller.
The ROBOTC firmware queues up to 10 sound items for playback. This allows user programs to initiate playback of a sound item and continue execution without having to wait for a sound item to finish; this mode of operation is very desirable for robots where, if you waited for the sound to complete playback, you could be delayed in updating the robot’s motors in reaction to a change in sensors.
There are several sample programs illustrating sound playback on a VEX controller. The file “songs.c” contains several complete songs that can be played as a background task while your robot continues to execute its main “mission” task.
|