Difference between revisions of "Tutorials/VEX Speaker module"
m (moved VEX Speaker module to Tutorials/VEX Speaker module) |
|||
Line 1: | Line 1: | ||
+ | {{DISPLAYTITLE:{{SUBPAGENAME}}}} | ||
<yambe:breadcrumb self="VEX Speaker module">Tutorials|Tutorials</yambe:breadcrumb> | <yambe:breadcrumb self="VEX Speaker module">Tutorials|Tutorials</yambe:breadcrumb> | ||
<br /> | <br /> |
Revision as of 14:58, 7 May 2012
Got a new VEX Speaker?
Wiki Link: VEX2_Functions_Sound To help you get started, here are two sample programs to try out your new VEX speaker attachment. |
Contents
Unboxing
Example Code
Sound Test:
task main() { //Basic "Play Sound" commands PlaySound(soundBeepBeep); wait1Msec(200); //Intelligent "Play Sound" command //Delay until sound is done playing PlaySound(soundFastUpwardTones); while(bSoundActive) wait1Msec(1); //Play a tone: //First Parameter: Frequence in Hz //Second Parameter: Length to play in 1/100th of a seconds (50 = .5 seconds) PlayTone(440, 50); wait1Msec(500); //Play a Sound File (need to use the File Management to Upload First) PlaySoundFile("1.wav"); wait1Msec(1000); }
Sample Program Downloads
PowerPoint explaining VEX Speaker
Sound Files