Shop OBEX P1 Docs P2 Docs Learn Events
I need help — Parallax Forums

I need help

okonisfreeokonisfree Posts: 38
edited 2006-07-25 17:13 in Robotics
ok, i have a Boe-bot, it's fully assembled and programmed. but, i want to add a feature. i m using pbasic 2.5 and stamp 2.

i m trying to make it play tunes with the piezo speaker. is there an eaiser way instead of just doing "FREQOUT x, xxxx, xxxxx" ?? when i say tunes i mean like jingle bells....in a midi kinda way

Comments

  • okonisfreeokonisfree Posts: 38
    edited 2006-07-19 17:43
    no1???
  • Steph LindsaySteph Lindsay Posts: 767
    edited 2006-07-19 18:05
    You might want to check out Chapter 8 of "What's a Microcontroller" v2.2 - it is entirely about frequency and sound, and introduces·various coding techniques for playing tunes on the piezospeaker more efficiently than one FREQOUT line per note.··The last activity in the chapter·includes an RTTTL Ringtone Player application program.· The book pdf and the MicroMusicWithRtttl.bs2 program are both available for free download from

    http://www.parallax.com/detail.asp?product_id=28152

    -Stephanie Lindsay
  • okonisfreeokonisfree Posts: 38
    edited 2006-07-19 18:15
    smile.gif·tyvm!!!!!!!!!!smile.gif
  • AImanAIman Posts: 531
    edited 2006-07-21 17:09
    I am doing the Sound of Music song (Do a Dear...) on my BS2. And the best book I found so far is 'Whats·a Micro Controller" it gets into how to use the FREQ OUT like you mentioned, however it also goes into sound effects and how to use notes in more then one place via short cuts.
  • AImanAIman Posts: 531
    edited 2006-07-21 17:12
    Never mind, I just say what Stephanie Lindsay posted.
  • dandreaedandreae Posts: 1,375
    edited 2006-07-25 17:13
    Check out this code for the peizo speaker (attached).

    Dave

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

    Tech Support
    dandreae@parallax.com
    Http://www.parallax.com
Sign In or Register to comment.