Log in

View Full Version : [FTC]: How to play sound from NXT


gregsanCHEVY121
28-01-2009, 21:10
Hello there, my team is trying to play a sound by pressing a button on the controller. The sound is one that we have put onto the brick, not a stock sound. It will play the sound if selected in the sound menu on the brick, however we can not figure out how to play it when we press a button, we are using RobotC.

Thanks,
Greg

emmell
29-01-2009, 00:14
Assuming you use button 1 to play the sound:


if (joy1Btn(1))
{
PlaySoundFile("name of sound file name");
}

craig_yates
27-02-2009, 00:15
Thats what it was. We just forgot to put in the quotation marks.

craig_yates
27-02-2009, 00:18
We found that using a clearsounds() (or something like that) at the beginning would stop the sound from repeating indefinately.

boogyoogy
14-03-2009, 15:28
Now how do you download sound files onto the nxt? I've tried to download multiple files in mp3 format to the brick so that we can play the sound when we press a button.

craig_yates
07-04-2009, 10:10
You have to convert the mp3 to a .rso
just google it- there is a free converter.