I found out that it goes into a digital output, and setting values of 0 and 1 literally moves the speaker up and down to create the vibration for sound. The speed at which it changes between 0 and 1 affects the frequency.
I am curious about both of these as well. If there are no mounting holes on the bottom, then I suppose you can use the Velcro circles that were previously used to hold VEXnet keys in place.
ROBOTC already has commands for playing tones to the speaker; look under the “Sound” category. On the Cortex, they play to the SP port, and on the PIC Microcontroller they play to a motor port. (I’m not sure if the new VEX Speaker would survive being plugged into a motor port, so don’t do that unless the instructions say its OK).
There are screws on the bottom which can be removed and used to attach to metal plat or bar. We had ours out at worlds today and the boys were having fun making all sorts of noises, one of them even got part of the mario bros. theme going.
It can get pretty loud with the right choice of frequency. Loud enough to annoy…
“If using the VEX speaker (Part #276-1504), the chosen audio must not be distracting and must be in good taste. The Head Inspector and Head Referee will make the final decision on the appropriateness of the audio”
Actually, ROBOTC has functions for playing small sound files. The audio quality isn’t outstanding, and the clip length has to be pretty short (a few seconds), but you could maybe add R2-D2-like sound effects.
I looked but only found the reference to play a sound file on the NXT file system. Will this work on a Cortex? how would we transfer the sound files? I was hoping to see this capability but can’t seem to find a way to do it from the included documentation. I did not review the system files or try experimenting yet.