Boe-Bot police siren

Hi everybody,
I would like to make the piezo speaker sound like a police.
Please answer my question.
Thanks
Joelectro66
I would like to make the piezo speaker sound like a police.
Please answer my question.
Thanks
Joelectro66
Comments
http://www.dummies.com/how-to/content/electronics-projects-how-to-create-sound-effects.html
The SoundPAL has American-Style Siren as one of the Canned Sound Sequences, accessed by the Play command.
https://www.parallax.com/product/28825
Thanks for helping me, in first site, I tried the 2 codes but it didn't worked.
The SoundPal is a good product, but I don't want to buy something.
I just want to program the piezo speaker.
Thanks again
Joeletro66
The first program in post# 2 should work:
' {$STAMP BS2} ' {$PBASIC 2.5} ' Siren Effect Program ' Doug Lowe ' July 15, 2011 ' ' This program generates a rising and falling pitch similar to a police siren. ' The rate at which the pitch rises and falls changes if you press either ' of the two pushbuttons. Speaker PIN 0 Switch1 PIN 10 Switch2 PIN 14 Frequency VAR Word Time VAR Word DO FOR Frequency = 3000 TO 5000 STEP 15 GOSUB SetTime FREQOUT 0, Time, Frequency NEXT FOR Frequency = 5000 TO 3000 STEP 15 GOSUB SetTime FREQOUT 0, Time, Frequency NEXT LOOP SetTime: Time = 15 IF Switch1 = 1 THEN Time = 5 ENDIF IF Switch2 = 1 THEN Time = 2 ENDIF RETURN
You will need the two switches.
Do you have a photo of your setup? That would help alot.