Shop OBEX P1 Docs P2 Docs Learn Events
Siren with Piezo — Parallax Forums

Siren with Piezo

NWCCTVNWCCTV Posts: 3,629
edited 2010-03-05 04:37 in BASIC Stamp
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.

Comments

  • PJAllenPJAllen Banned Posts: 5,065
    edited 2010-03-05 00:02
    Maybe a euro-siren, alternating two tones (deee-dooo, deee-dooo,...)?
  • ercoerco Posts: 20,256
    edited 2010-03-05 00:38
    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."
  • kf4ixmkf4ixm Posts: 529
    edited 2010-03-05 00:49
    Do

    freqout 11, 200, 700, 750
    freqout 11, 200, 900, 950

    loop
  • BoeBotBoeBot Posts: 37
    edited 2010-03-05 03:34
    http://forums.parallax.com/showthread.php?p=887352

    Check the attachment. smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Change is inevitable - except from a vending machine.

    Robert C. Gallagher

    Post Edited (BoeBot) : 3/5/2010 3:55:02 AM GMT
  • NWCCTVNWCCTV Posts: 3,629
    edited 2010-03-05 04:37
    Thanks everyone. I think I got it now.
Sign In or Register to comment.