Shop OBEX P1 Docs P2 Docs Learn Events
How to combine 2 programs for the Boe-Bot — Parallax Forums

How to combine 2 programs for the Boe-Bot

Hi everybody,
I have a Boe-Bot and I would like to combine 2 programs.
But each time a message appear saying: "Undefined Label".
So my questions are: What is a label? Why is it undefined? How can I combine correctly the programs? 






Comments

  • Hi everybody,
    I have a Boe-Bot and I would like to combine 2 programs.
    But each time a message appear saying: "Undefined Label".
    So my questions are: What is a label? Why is it undefined? How can I combine correctly the programs? 








    Can you ZIP your program up and use the attachments when responding to include the file. It would be eaiser to figure out if we had the full program listing.
     
  • Joelectro66,
    What 2 programs are you trying to combine?
    Labels are mostly used for subroutines but it could also be the name of an I/O Pin.
  • Joelectro66Joelectro66 Posts: 4
    edited 2015-07-11 15:14
    Hi Genetix,
    I am trying to combine the program named: SchoolDays.bs2 http://isl.ecst.csuchico.edu/DOCS/Robots/Parallax/BoeBot/Code/Robotics!/ (last program of chapter 8).


    I tried to combine the two programs by putting StripeFollowingBoeBot.bs2 first and SchoolDays second the first program (StripeFollowingboeBot.bs2) worked correctly but the second didn't worked at all.
  • Can you zip up the combined program and attach it here?
    You can't just concatenate the two programs. 
  • Joelectro66,
    The BS2 microcontroller which the Boe-Bot uses can only do one thing at a time and since servos need a pulse every 20 ms, or 50 times a second, there isn't much time leftover for playing notes. Also since line following can involve a lot of maneuvering it's better to have another device do the music playing.
    One such device is the SoundPal (Product# 28825) which unfortunately Parallax no longer sells but you should be able to find it from one of the many distributors and resellers.
    If you plan on doing even more complex activities then you should consider switching to the Propeller microcontroller which is a lot more capable than the BS2.
  • SoundPal's may be available at:
    http://www.robotshop.com/en/parallax-soundpal-sound-module.html

    If I don't buy them out first! :)

  • Looks like I got the one last module. No more in stock.

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    The following videos get into the concept of merging programs, although it is difficult to be specific doing something like this, so think of the videos as a set of guidelines, if it helps.



  • Chris, Great video as always!
    Jim

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2015-07-29 19:54
    Jim,
    Thanks. One of these days I would like to redo that one to try and be a bit more generic and clear. But for now it helps some people so...
    Plus when I did it there was a limit on size so I had to break it into two parts. Now I could do much more in a single video.
Sign In or Register to comment.