PBasic question
AngDeaver
Posts: 4
I am trying to see if I can create a PBasic program on my own, to ensure that I am understanding the different concepts. To challenge me, even more, my husband has given me a list of maneuvers to try and make my Boe-Bot do.
The one I am currently stuck on is - he wants it to perform a figure 8, but if something touches it's whiskers for it to pause until it is no longer being touched and then continue on it's previous course. For the life of me I can't figure out how to make it continue from where it left off.
I was thinking I might be able to next an if...then...else statement, by having it track how far it was in the count (instead of how many times the whiskers were touched back and forth to initiate the U-turn). However, I am wondering if I bit off more than I can chew.
Is there a "continue" code out there somewhere?
Thanks in advance,
Ang
The one I am currently stuck on is - he wants it to perform a figure 8, but if something touches it's whiskers for it to pause until it is no longer being touched and then continue on it's previous course. For the life of me I can't figure out how to make it continue from where it left off.
I was thinking I might be able to next an if...then...else statement, by having it track how far it was in the count (instead of how many times the whiskers were touched back and forth to initiate the U-turn). However, I am wondering if I bit off more than I can chew.
Is there a "continue" code out there somewhere?
Thanks in advance,
Ang
Comments
I will try to write it up tonight.
Once your robot is traveling in a figure 8, I hope you post a video to the figure 8 thread.
In post #35 of my cheap bot thread, I give some pointers about programming a robot to drive in a figure 8. The code posted is for the Propeller but the principles are the same about using a "turn" value to adjust the speed of the servos.