Shop OBEX P1 Docs P2 Docs Learn Events
piezospeaker — Parallax Forums

piezospeaker

andy11667andy11667 Posts: 26
edited 2005-07-17 22:43 in BASIC Stamp
i know you can make the piezospeaker play differnt tones but does anybody know how to make play the full star wars theme

Post Edited (andy11667) : 7/14/2005 6:38:51 PM GMT

Comments

  • dandreaedandreae Posts: 1,375
    edited 2005-07-14 18:17
    Here·are a couple of programs (attached)·that were written for the BASIC Stamps 1 and 2 using the ·Activity board that will help you with developing songs.

    Dave

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

    Tech Support
    dandreae@parallax.com
    Http://www.parallax.com
  • DudeOfDestructionDudeOfDestruction Posts: 12
    edited 2005-07-14 19:47
    I am using tha Boe bot with IR navigation and it has piezospeaker connected, can I also do that with it, if so what do I have to change or do to make it work?
  • Steve JoblinSteve Joblin Posts: 784
    edited 2005-07-14 19:54
    Check out Chapter 2 of the Robotics! Stamps In Class... You use the freqout command to change the pitch and duration of the note to be played. Check out http://www.geocities.com/stampic/links.htm If I remember, I found some great songs that you can play with a BS2
  • DudeOfDestructionDudeOfDestruction Posts: 12
    edited 2005-07-14 19:59
    Yeah I know, but I am a beginner, so can someone explain me in exact words how to change it and what to change?
    I have the Boe bot board of education USB version, and is on P4, can some do it for me and then post it or tell me how to change it?
  • DudeOfDestructionDudeOfDestruction Posts: 12
    edited 2005-07-14 20:02
    I mean like to make it start when I reset the board, and only play onec, I am going to have a class competition tomorrow and that would be so neat to have
  • dandreaedandreae Posts: 1,375
    edited 2005-07-14 20:10
    In the code that I posted you'll want to use the same I/O pin as in the code and it play just fine.· If you want it to play just once, make sure that it is not in a loop.

    Dave

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

    Tech Support
    dandreae@parallax.com
    Http://www.parallax.com

    ·
  • DudeOfDestructionDudeOfDestruction Posts: 12
    edited 2005-07-14 20:22
    I tried to do it but in the debug window it says Star Wars theme, and I don't hear anything.
    I have the IR navigation system connected, can that be what's causing the problem?
    this is the how my board is right now and it also has two leds connected to it.
  • dandreaedandreae Posts: 1,375
    edited 2005-07-14 20:31
    Connect the speaker to I/O pin 11 and it should work.

    Dave

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

    Tech Support
    dandreae@parallax.com
    Http://www.parallax.com

    ·
  • DudeOfDestructionDudeOfDestruction Posts: 12
    edited 2005-07-14 21:12
    thanks for everythig it worked, but I have another question that maybe kind of stupid since I am beginner, I am using the fastIRroaming.bs2 code that appears on the book and I changed it it so the LEDs will turn on when each ir detected something. How can I add that script so that the song starts when I reset the board without interfiering with the IR navigation(I tried to add it, but it says "Label Missing". so can you help me by telling what I have to do?
    Thanx
  • dandreaedandreae Posts: 1,375
    edited 2005-07-14 22:09
    You should be able to add it at the top of your code and have it drop down to the main code so that it only plays on start up.· If you are still having problems, attached a·file of your code so that we can look at it.



    Dave

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

    Tech Support
    dandreae@parallax.com
    Http://www.parallax.com

    ·
  • DudeOfDestructionDudeOfDestruction Posts: 12
    edited 2005-07-14 23:45
    did anyone find out what was wrong?
  • dandreaedandreae Posts: 1,375
    edited 2005-07-14 23:58
    You need to incorporate the two codes together as mentioned before.· I noticed that you·only had one code listed.· We can help you with the code, but we can't write it for you.

    Dave

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

    Tech Support
    dandreae@parallax.com
    Http://www.parallax.com

    ·
  • DudeOfDestructionDudeOfDestruction Posts: 12
    edited 2005-07-14 23:59
    then, where can I put it?
    at the top?
    just like that, do I need any extra commands
  • DudeOfDestructionDudeOfDestruction Posts: 12
    edited 2005-07-15 00:43
    can someone tell me what is wrong with that?
  • andy11667andy11667 Posts: 26
    edited 2005-07-16 19:02
    can we get this fourm back on track
  • Daniel_NYCDaniel_NYC Posts: 3
    edited 2005-07-17 03:49
    Howdy All



    Interesting ideas - I am trying to make an educational exhibit and would like to have the basic stamp "play' its program instuctions or operations to a speaker.· Any Ideas?

    Daniel Nauke

    Nauketec@nauke.org
  • andy11667andy11667 Posts: 26
    edited 2005-07-17 22:43
    try getting a speech board from parallax

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    GOOGLE IS YOUR FRIEND
Sign In or Register to comment.