Shop OBEX P1 Docs P2 Docs Learn Events
Music program problem — Parallax Forums

Music program problem

PrettybirdPrettybird Posts: 269
edited 2009-07-23 23:23 in BASIC Stamp
· I got this program off this site and noticed that there is no sound output instruction. I tried inserting but got errors. I am using a BS2P and also heard it can handle atom software. Has anyone seen this one before? I am still new. Any help would be helpful.

Comments

  • dandreaedandreae Posts: 1,375
    edited 2009-07-23 15:03
    This code was written for the BS2 using the BASIC Stamp Activity Board and uses a piezo speaker that is onboard.· If you are using the BS2p you'll need to change the the values for each note as the units in frequency are different for the BS2p compared to the BS2.· The units for frequency are 1Hz for the BS2 and 3.77Hz for the BS2p.· I'm attaching a couple of files for the BSAC board.

    Dave

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Dave Andreae

    Parallax Tech Support
  • Mike GreenMike Green Posts: 23,101
    edited 2009-07-23 15:10
    It's very unhelpful to say "but got errors". What kind of errors ... specifically!

    Did you look at the program? Do you know what kind of statements are used? Did you look up unfamiliar ones in the Manual?

    Did you see the FREQOUT statement? What does it do? Look it up.

    You'll notice that the FREQOUT statement like some others (PULSIN, PULSOUT, SERIN, SEROUT, etc.) use timing values that are dependent on the Stamp model you're using. The Stamp Manual has the conversion factors or the specific values needed for the different Stamp models. The BS2px is newer than the Manual and there's a separate addendum for the BS2px that has those values.

    The Atom microcontroller was designed to plug into sockets designed for the Basic Stamp and be similar to program so as to compete with the Basic Stamp. It's not identical though and it's more a matter of "the Atom is intended to be able to handle Basic Stamp software" than the other way around

    The program you showed is an old one ... I don't remember where it's kept on the Parallax website.
  • PrettybirdPrettybird Posts: 269
    edited 2009-07-23 19:43
    What book? I know the freqout I think. I even loaded it in an activity board and no go. Thanks for the help. No big deal. I'll play with it when I get a chance. Back to robotics.
  • Mike GreenMike Green Posts: 23,101
    edited 2009-07-23 20:14
    book: Basic Stamp Syntax and Reference Manual, v2.2 from the Downloads / Stamp Documentation page on Parallax's website
  • PrettybirdPrettybird Posts: 269
    edited 2009-07-23 23:23
    OK thanks
Sign In or Register to comment.