View Full Version : Siren with Piezo
NWCCTV
03-05-2010, 02:31 AM
I· was just wondering if anyone has any code for the piezo speaker in the Boe Bot kit to make a siren sound, either police or ambulance or fire truck. Thanks. Could also use a locomotive sond, but not sure if that is doable. I have been playing around with it, just cant seem to nail it down.
PJ Allen
03-05-2010, 07:02 AM
Maybe a euro-siren, alternating two tones (deee-dooo, deee-dooo,...)?
The Scribbler came preprogrammed with several demo routines, the last one generated a siren sound while it drove around and avoided obstacles. Track down that program from the P'lax website and extract that code...
But you can·achieve the same with several FREQOUT commands in a loop. Pretty basic stuff.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·"If you build it, they will come."
kf4ixm
03-05-2010, 07:49 AM
Do
freqout 11, 200, 700, 750
freqout 11, 200, 900, 950
loop
BoeBot
03-05-2010, 10:34 AM
http://forums.parallax.com/showthread.php?p=887352
Check the attachment. http://forums.parallax.com/images/smilies/smile.gif
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Change is inevitable - except from a vending machine.
Robert C. Gallagher
Post Edited (BoeBot) : 3/5/2010 3:55:02 AM GMT
NWCCTV
03-05-2010, 11:37 AM
Thanks everyone. I think I got it now.