How to combine 2 programs for the Boe-Bot
Joelectro66
Posts: 4
in BASIC Stamp
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?
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
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.
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.
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.
You can't just concatenate the two programs.
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.
http://www.robotshop.com/en/parallax-soundpal-sound-module.html
If I don't buy them out first!
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.