Terrapin Resources

Programming Pro-Bot

Teaching Pro-Bot to Move

Using the Arrow Keys

Pro-Bot is controlled by the buttons on the back left side of the car. Once the Pro-Bot power switch is turned on, you can begin to command the robot using just arrow keys and the GO button. Simply press the Forward or Back, Left or Right arrow keys to enter commands that tell Pro-Bot to move in the direction you want.

When using arrow keys alone, Pro-Bot moves forward and back in 15 centimeter increments (approximately 6 inches). Pro-Bot turns left and right 90 degrees at a time. When just arrow keys are used, Pro-Bot moves just like Bee-Bot.

Using the Screen

As you press the buttons, watch the screen on the right of the keypad, where the first line displays Main (for Main procedure). You will see that the command represented by the arrow key you press appears on the screen as you press the key: Fd for Forward, Bk for Backward, Lt for Left, and Rt for right. When you have entered all the movements you want Pro-Bot to follow, just press the GO button and watch Pro-Bot execute your series of commands. As each command is executed, it is highlighted on the Main command screen so you can watch as the Pro-Bot follows your program.

Scrolling through Code

Pro-Bot can remember up to 128 commands at a time so you can develop quite an extensive route for the robot to follow. The Pro-Bot screen can display up to 16 lines. This includes the title Main indicating this is the main program and up to 15 lines of commands. If you enter more than 15 commands, the first command in the list scrolls up and disappears and the new command appears at the bottom of the list. This process continues as you enter more commands, with the first command displayed in the list disappearing when the last command entered appears at the bottom of the list.

Though some of the commands in the Main program may not appear on the display, they are still in Pro-Bot’s memory. When you press the GO button, Pro-Bot follows the entire Main program, beginning with the first command, whether or not it is displayed when GO is pressed. If the first command(s) is not displayed when GO is pressed, Pro-Bot changes the display to highlight the first line of the program. The highlight then moves through each line of the program as Pro-Bot executes it. If the Main program has more than 15 lines of commands, the top line scolls off the screen when the last visible command is executed. The next line appears at the bottom of the screen and is highlighted while Pro-Bot executes that command.

That process repeats until all commands in the Main program have been executed. When the Main program has concluded, the screen displays the first 15 lines of the program and the highlight returns to the first line in the list. Pro-Bot is ready to GO again.

Try it: Send Pro-Bot along a square or rectangular route. What commands would you enter?

Changing the Commands

Navigating the Program

Pro-Bot’s Main screen not only displays the commands you have entered and highlights them as they are executed, but also makes it simple to change a series of commands after they have been entered to refine a route. When the commands are displayed on the Main screen, use the up and down arrow keys at the top right of the screen to the right of Menu to move the highlight up and down through the series of commands.

Insert or Delete Commands

To remove a command from the list, highlight that command and press the Clear button on the bottom right of the keypad below the 3 key to delete the command. To insert a command in the program, highlight the command before where you want to enter a new command. Press the key for the new command and it is inserted in the list below the highlighted command.

Try it: Send Pro-Bot along a square route. Then insert commands to change the route from a square to a rectangle.

Clearing the Program

You can delete your program one line at a time by using the Clear key and pressing it once for each command line. You may also delete the entire program at once by holding the Clear key down for 3 seconds and then using the down arrow key to the right of Menu to select Clr Main from the list of commands that appears. Then press Menu to clear the Main program. The Main screen and the Pro-Bot’s Main program memory is now empty and ready for you to enter a new series of commands.

Stop Pro-Bot

If you need to stop Pro-Bot while it is following a program, press the GO key and Pro-Bot stops. Press GO again and the Main program is initiated from the beginning.

Preserving Memory

When you turn Pro-Bot off, the current Main program is preserved and appears when the power switch is turned on again. Each time Pro-Bot is turned on, it is ready to go with the last Main program that was entered.

Specifying Distance and Turns

Using the Numeric Keypad

You can explore a great deal with Pro-Bot using the default movements of 15 centimeters and turns of 90 degrees. Pro-Bot is capable of following more nuanced and detailed routes since it also allows you to specify the distance it moves with each Forward (Fd) or Back (Bk) command and the number of degrees it turns with each Left (Lt) or Right (Rt) command.

To do so, use Pro-Bot’s numeric keypad to enter the distance or degrees you want after pressing the arrow key. After you press the Forward or Back arrow, the number you enter tells Pro-Bot how many centimeters to move. After you press the Left or Right arrow, the number you enter tells Pro-Bot how many degrees to turn.

Try it: Press the following sequence of keys to tell Pro-Bot to go forward 10 cm and turn right 45º.

The following appears in the Main program window

Press GO and watch Pro-Bot do as you commanded. Add to that program or try another.

Program Capacity

Pro-Bot can remember up to 128 commands so you can plan quite a route. (Note: The Main display shows 15 commands at a time, but you can scroll through the entire program.)

Repeating

It can be tedious to enter a long series of commands, especially if you want Pro-Bot to repeat a set of movements and turns as part of its route. Pro-Bot makes it easy to repeat a series of commands without entering them individually with its repeat function.

Creating a Repeat Loop

There are four steps to tell Pro-Bot to repeat a series of commands:

  1. Tell Pro-Bot to repeat by pressing the Rpt[ key.
  2. Tell Pro-Bot the number of times to repeat by pressing the appropriate number key.
  3. Tell Pro-Bot what to repeat by entering a series of commands.
  4. Tell Pro-Bot you are finished with the sequence of commands to be repeated by pressing the ] key.

Try it: Think of a series of commands you would like to repeat. For example, you can use the repeat function to command Pro-Bot to follow the square route you did earlier, but can do so by entering fewer commands.

Start by pressing the Rpt[ key. The command appears on the Main screen as

Then press the number of times you would like Pro-Bot to repeat the commands you plan to enter. In the case of a square route, press the 4 key. The Main screen displays

For Pro-Bot to follow a square route, it must move either forward or back and left or right four times. Enter the combination of movement command (Fd or Bk) and turn command (Lt or Rt) you prefer. If you choose Fd and Rt, the screen displays

To confirm that you have completed the repeat sequence, press the ] key. The screen will display

Highlighting a Repeat Loop

Press GO and Pro-Bot will move in a square route. The command that Pro-Bot is currently following is highlighted on the Pro-Bot screen. In a repeat command the highlight moves through the series of commands starting with the first after the [. When it finishes with the last command in the list, just before ], the highlight jumps back to the first command in the list. This process repeats the number of times specified in the repeat command.

Concluding a Repeat Loop

You must conclude the series of commands that you want Pro-Bot to repeat by pressing the ] key. If you neglect to press the ] key after entering commands you want to repeat and then press GO, Pro-Bot executes the series of commands only once and then stops since the closing ] is required for Pro-Bot to know to repeat the commands. In this case, use the arrow keys to move the cursor to the last command in the repeating sequence and press the ] key. The closing ] is inserted after the last command. Subsequently, when you press GO, the series of commands between [ and ] are repeated the specified number of times.

Developing Programs

Translating a Program into Pro-Bot Commands

Programming Pro-Bot is as simple as pressing keys on the Pro-Bot keypad. Getting Pro-Bot to do exactly what you want requires deciding the route you want Pro-Bot to follow, breaking it down into specific Pro-Bot commands, measuring the distances and turns, and finally entering this information into Pro-Bot by pressing the corresponding keys.

For example, if you want Pro-Bot to move in a square, you need to analyze the structure of the square and translate that into commands Pro-Bot can understand. A square has four sides of equal length, so Pro-Bot must make four forward (or back) movements of equal distance. The distance you decide on determines the size of the square.

A square has four corners so the Pro-Bot must turn left (or right) four times. Since each corner of a square is a right or 90 degree angle, Pro-Bot must turn 90 degrees each time.

Try it: To command Pro-Bot to follow a square route of 25 steps on a side, you enter the same movement and turn commands four times

and then press GO.

Since a square requires the same two commands to be executed four times sequentially, you could alternatively enter the commands once using the repeat function

And then press GO.

Programming Sequence

Follow the same process for any route you want Pro-Bot to follow. Decide on the route you want and the length of Pro-Bot’s forward and back movements and the number of degrees for Pro-Bot to turn. Then enter this information in the Main program by pressing the buttons on the Pro-Bot’s keypad. Press GO to watch Pro-Bot carry out your commands.

Drawing

Pen Mechanism

Pro-Bot has a pen mechanism that holds a standard felt-tip pen enabling Pro-Bot to draw as it moves. This allows Pro-Bot to leave a written record of its route as it moves, which makes it easy to analyze the program and decide on changes and refinements. The pen mechanism also allows Pro-Bot to be used as a drawing mechanism to make interesting shapes and pictures.

Raising and Lowering Pen

Pro-Bot’s pen mechanism is in the middle of Pro-Bot and is marked Down and Up with two small handles that allow it to be turned. The pen is in the middle of Pro-Bot’s wheels, which means Pro-bot pivots around the pen when it turns. Pro-Bot draws when it moves forward and back but does not draw when it turns.

Preparing to Draw

To draw with Pro-Bot, first prepare the drawing area by locating a large sheet or roll of paper on a hard surface and locate a felt tip marker of the color you prefer. Raise the Pro-Bot pen mechanism to the up position by turning it counter-clockwise so that the handles are aligned with the direction of Pro-Bot. Remove the cap from the marker and gently insert the pen. Lower the pen mechanism by turning it clockwise until the pen drops into place, so that the point is touching the paper.

With the pen in place, Pro-Bot draws as it follows the Main program you have entered.

Remove or Change Pen

To remove the pen or exchange a pen of one color for another, raise the pen mechanism to the up position by turning it counter-clockwise and gently remove the pen by pulling it up. Insert another pen if desired, and lower the pen mechanism.

Operating without a Pen

If no pen is inserted, the pen mechanism may be in the up or down position and does not affect how Pro-Bot operates.

Customizing Pro-Bot

Pro-Bot is highly adaptable and can be customized for different environments and situations.

Subprocedures

Pro-Bot offers up to 32 subprocedures that the user can develop. Each subprocedure can hold a set of commands that are executed when that subprocedure is called by the Main program. A set of commonly used tools in Pro-Bot programs can be developed and stored in Pro-Bot’s memory so that they are available whenever Pro-Bot is in use. This lets you develop your own customized toolbox for Pro-Bot, which is available whenever you need it.

Decals

Pro-Bot comes with a set of decals you can use to decorate the robot. From numbers to wheel designs, the decals can be applied to give Pro-Bot a customized look.

Attaching K’Nex Constructions

Pro-Bot comes with hexagonal slots that allow standard K’Nex building set parts to be attached. With this feature, Pro-Bot can become a mobile platform for constructions made with K’Nex parts. There are four K’Nex connecting slots on Pro-Bot, one each above each wheel well. For more information about K’Nex construction kits, visit www.knex.com.