Presentation is loading. Please wait.

Presentation is loading. Please wait.

ROBOTC Sounds ROBOTC with the VEX has a speaker port available on it for playing basic and polyphonic tones. You can play the follow types of sounds: –

Similar presentations


Presentation on theme: "ROBOTC Sounds ROBOTC with the VEX has a speaker port available on it for playing basic and polyphonic tones. You can play the follow types of sounds: –"— Presentation transcript:

1 ROBOTC Sounds ROBOTC with the VEX has a speaker port available on it for playing basic and polyphonic tones. You can play the follow types of sounds: – A specific note – PlayTone(); – A system sound – PlaySound(); – A user loaded sound file (.wav) – PlaySoundFile();

2 Playing Sounds PlayTone(frequency, durationIn10MsecTicks); – Example: PlayTone(440, 10); – Plays a 440hz note for 100ms. PlaySoundFile(“fileName.wav”) – Will play the sound file “fileName.wav”. – Use the “File Management” Utility for downloading sound files onto your VEX Robot – Advanced Tools – File Management

3 Playing Sounds PlaySound(sound); – Plays a specific sound effect that is pre-programmed into the VEX soundBlip soundBeepBeep soundDownwardTones soundUpwardTones soundLowBuzz soundFastUpwardTones soundShortBlip soundException soundLowBuzzShort

4 Sound Variables bSoundActive – A Boolean variable informs the user if the VEX is actively playing a sound. Returns “true” if a sound is playing, “false” if no sound. bPlaySounds – A Boolean variable to “mute” the VEX. Set bPlaySounds to “false” to mute the VEX. Set bPlaySounds to “true” to unmute the VEX. – The #define shortcuts are also acceptable: MuteSound(); UnmuteSound();

5 Sound Queue The VEX has an internal queue in order to line up sound commands. – This queue will automatically process any waiting sound commands, in order that they are received. – You can override/check on the queue with the following commands: PlayImmediateTone(frequency, durationIn10MsecTicks); – This command will force the “playTone” command to jump ahead of the queue. bSoundQueueAvailable – A Boolean Variable to check if the sound queue is full. Returns a “true” if there is space available, “false” if the queue is full.

6 VEX File Management The file management utility allows you to see all of the programs, sound files and other files that are loaded on your VEX.

7 VEX File Management From the file management utility, you can.. – Upload files – Download files – Run/Stop Programs – Delete files – Create custom firmware images – Check space available on the VEX


Download ppt "ROBOTC Sounds ROBOTC with the VEX has a speaker port available on it for playing basic and polyphonic tones. You can play the follow types of sounds: –"

Similar presentations


Ads by Google