Shop OBEX P1 Docs P2 Docs Learn Events
Boe Bot Programming Songs with Frequencies — Parallax Forums

Boe Bot Programming Songs with Frequencies

Zsy6Zsy6 Posts: 37
edited 2006-05-20 00:57 in Robotics
Hello I'm Zsy and I'm new here, but I've had a Boe-Bot for quite a while and I am on page 110 of the Instruction manual.· I was wondering, has anyone programmed their Boe-Bot to play a short song through the piezospeaker included with the kit?· If so, post it here because I am looking for a tone to play when my Boe-Bot starts up.

Comments

  • PJAllenPJAllen Banned Posts: 5,065
    edited 2006-05-19 16:38
    Look here -- http://forums.parallax.com/showthread.php?p=572097

    and maybe here -- http://forums.parallax.com/showthread.php?p=584314

    Post Edited (PJ Allen) : 5/19/2006 4:42:12 PM GMT
  • edited 2006-05-19 17:36
    There are lots of song examples in What's a Microcontroller Chapter 8. What's a Microcontroller is available for PDF downlaod from www.parallax.com. Here is a link: What's a Microcontroller v2.2 (.pdf).
  • XNORXNOR Posts: 74
    edited 2006-05-19 18:09
    I had also tried to make my BOE-Bot sing a few tunes. A problem that occured was that certain notes would 'jump-out' and be much louder than the rest. freaked.gif If I remember correctly, these notes were around 3000 and 4000 Hz. I don't know if the problem lies with the speaker that comes with the BOE-Bot, or if the problem is with the way the 'freqout' command creates notes.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-05-19 18:11
    Yes, the Piezo speaker included works best around those frequencies, therefore they will ultimately sound a little louder and less distorted.· However you can always use a standard speaker by following the connection diagram shown in the BASIC Stamp manual and in the Help File under FREQOUT.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • edited 2006-05-19 18:23
    Yeah, it has to do with the fact that those piezospeakers are designed to work best at about 4500 Hz (the smoke alarm shriek). When you get up past 3500, the volume really increases. The second link in PJ Allen's post gets you to a schematic of the Parallax Professional Development Board (with a nice audio circuit for driving an external 8-ohm speaker). Although it doesn't call out the opamp, I think it's an LM386. Here's another link with a fairly simple amplifier circuit that should also work with an 8-ohm speaker: AppMod: Sound Module. Either one should eliminate that sudden high volume that occurs with a few of the higher notes, and give you much better tone quality as well.
  • Zsy6Zsy6 Posts: 37
    edited 2006-05-19 20:19
    Thanks for the help guys, and if anyone is up to the challenge, do you think you could get the Super Mario Bros. theme song to play off of the piezo speaker, or the 1-up noise from the game to play, if so post the bs2 file here. Also, if anyone has a bs2 file containing a song post it here.
  • edited 2006-05-19 20:33
    One of the programs I included in What's a Microcontroller chapter 8 is a RTTTL player. If you can find the Nokia Ringtone RTTTL file, the last example program in Chapter 8 can play it.

    Of course, you could also get·the AP-8 audio player, which would greatly simplify the job, and allow you to play the tune while the Boe-Bot is moving.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-05-19 21:32
    Here are some R2D2 sounds to get you going...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • Zsy6Zsy6 Posts: 37
    edited 2006-05-20 00:21
    Andy Lindsay (Parallax) said...
    One of the programs I included in What's a Microcontroller chapter 8 is a RTTTL player. If you can find the Nokia Ringtone RTTTL file, the last example program in Chapter 8 can play it.

    Of course, you could also get·the AP-8 audio player, which would greatly simplify the job, and allow you to play the tune while the Boe-Bot is moving.
    Well then this leads to another question...
    Where am I gonna get a Super Mario Bros RTTTL file?
  • edited 2006-05-20 00:24
    Do a some Google searches for RTTTL and Super Mario Brothers.

    Keep in mind if you go with the AP-8 audio player, you can just record and play it back.
  • Zsy6Zsy6 Posts: 37
    edited 2006-05-20 00:50
    Thank you everyone!
    I got the Super Mario Bros. Theme on my Boe-Bot with the attached file!
  • Zsy6Zsy6 Posts: 37
    edited 2006-05-20 00:57
    I also did the theme from the game balloon fight!
Sign In or Register to comment.