Shop OBEX P1 Docs P2 Docs Learn Events
Need help with PBasic and Boe-Bot Programming?? ASAP. Thanks. — Parallax Forums

Need help with PBasic and Boe-Bot Programming?? ASAP. Thanks.

shoma2kshoma2k Posts: 2
edited 2011-04-12 12:08 in Learn with BlocklyProp
Need help with a project...PLEASE?

I need help as i've been trying for a while to write a PBasic
program that will perform the following list of tasks for a Boe-Bot.Interface Circuitry for your Boe-Bot:
* Two servo motors are connected to I/O pins 0 and 1. The left motor is connected
to pin 0 while the right motor is connected to pin 1.
*Two tactile sensors (switches) are connected to I/O pins 2 and 3. The left switch is
connected to pin 2 and the right switch is connected to pin 3.
*A piezoelectric speaker is connected to I/O pin 4.
*Three LED's are connect to I/O pins 5-7. Pin 5 has a red LED connected to it, pin
6 a yellow LED and pin 7 has a green LED

Program tasks:

Have your Boe-Bot constantly rolling forward (roaming) until one ( or both) of the tactile sensors contact an object. Any time a sensor contacts an object, sound a tone on the speaker. If the left sensor is pressed, sound a tone on the speaker, have the Boe-Bot stop, backup, turn right and continue rolling. If the right hand sensor is pressed, sound a tone on the speaker, have the Boe Bot stop, backup and turn left and continue rolling. If both sensors are pressed a the same time, sound two tones on the speaker, have the Boe Bot stop, backup, turn 180 degrees around and then continue rolling.

Use ramping at the beginning of each forward motion. The 3 LED's will light under the following conditions. Anytime the Boe Bot is stopped, the red LED will be on. Anytime ramping is being used, the yellow LED will be on. When the Boe Bot is in forward full speed motion, the green LED will be on.

Keep track of how many times the Boe Bot touches and object and have the Boe Bot end the program after it counts 25 touches.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2011-04-12 12:08
    We'd be happy to advise you, answer specific questions, clarify points, but you're going to have to do the work. If you have "no clue" about how to go about this, you're probably going to have to go to your teacher and beg for mercy. On the other hand, if you've studied about Stamp programming and already done pieces of the project and just feel overwhelmed, you may be ok. The trick is to break down the overall tasks into smaller ones until you have something manageable. You can do that with a flowchart or just a prose description of what the robot is supposed to do or a "pseudo-PBasic" description. There are 3 paragraphs to what the BoeBot is supposed to do. Start with the first one. You have 4 situations: 1) default; 2) left sensor contact; 3) right sensor contact; 4) both sensors contact. Some of the things the BoeBot has to do in each case are the same. Those obviously become subroutines. Situations #2, 3, and 4 all involve some kind of turning. There are examples as subroutines in the "Robotics with the BoeBot" tutorial that you can download or find as part of the Stamp Editor's help files. You might look there in the description of a roaming BoeBot which does many of the things you need to do.
Sign In or Register to comment.