Difference between revisions of "Tutorials/VEX Speaker module"

Jump to: navigation, search
Line 62: Line 62:
== Sample Program Downloads ==
== Sample Program Downloads ==
*[[File:VEX Songs.c]]
*[[Media:VEX Songs.c]]
*[[File:Sound Test.c]]
*[[Media:Sound Test.c]]
<br />
<br />
== PowerPoint explaining VEX Speaker ==
== PowerPoint explaining VEX Speaker ==
<br />
<br />
== Sound Files ==
== Sound Files ==
<br />
<br />

Revision as of 15:56, 7 May 2012

Tutorials → VEX Speaker module

VEX Speaker
Got a new VEX Speaker?

VEX Robotics just announced (and released) their new Speaker accessory for the VEX Cortex Microcontroller. This cool new speaker will allow you to play tones, sounds and wave (.wav) sound files from your VEX Cortex. The new speaker plugs into the “SP” port on the Cortex – check near the bottom of the sensor bank of ports. The speaker even has a built in volume control:

Check out our cool unboxing photos below, exclusive from the VEX World Championships!

The awesome thing with this new speaker accessory is that ROBOTC already has support for this new speaker built into version 3.08! For more information on how to use the speaker, check the ROBOTC help documentation built into ROBOTC, or look at our new (under construction) ROBOTC code wiki!

Wiki Link: VEX2_Functions_Sound

To help you get started, here are two sample programs to try out your new VEX speaker attachment.


Example Code

Sound Test:

task main()
  //Basic "Play Sound" commands
  //Intelligent "Play Sound" command
  //Delay until sound is done playing
  //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);
  //Play a Sound File (need to use the File Management to Upload First)

Sample Program Downloads

PowerPoint explaining VEX Speaker

Sound Files