Getting Started

The New Worksheet

When you first start the Scribbler Program Maker, you will be presented with a new worksheet. The worksheet is where you will place the tiles that make up your Scribbler program. The main program always begins at the red "start" tile labeled with the green gear. It ends with the red "end" tile labeled with the yellow- and black-striped barricade. The program shown here is empty and doesn't do a thing. If you were to load this program into the S2, it wouldn't do anything either, except sit there, staring blankly.

To make the S2 do something, you have to add tiles to its program. The tiles are selected using the buttons in the lefthand column, and must always be inserted between two existing tiles on the worksheet. (The one exception to this is when you define a new subroutine, covered later in this tutorial.)

There is also a zoom out button (the one with the magnifying glass -- or rather a minifying glass). By clicking on this button, the entire worksheet will shrink to a size that will fit within the confines of its window, and all of its tiles will show up as miniature colored rectangles. the mouse pointer changes into a little corner icon, as shown. Anywhere on the worksheet you click this icon will become the new upper-lefthand corner of the worksheet window, and the worksheet will return to its standard magnification.

You need never worry about running off the bottom of the worksheet with your programs, as it will simply expand to accomodate them.

Inserting a Tile

To insert a tile into your program, you must first select it using one of the tool buttons on the lefthand side of the screen. When you click on one of these buttons, it will light up, signifying the tool you have chosen. Here, the LED On/Off tool has been chosen.
Next, move the mouse pointer out onto the worksheet. When you position the pointer between two tiles, as shown here, a cursor will appear, indicating that it's okay to insert the selected tile into the chosen position. Sometimes, the cursor may not appear where you want to insert a tile. This indicates that the position you've chosen is not a valid location for the that particular tile, and you will not be allowed to insert the tile there. The Scribbler Program Maker will not let you generate a program containing errors.
Once you've positioned the pointer where you want the tile, and the cursor appears, click the mouse once. The tile you've selected will appear, hovering above the worksheet. In most cases, a configuration box will also pop up, allowing you to configure the tile for the actions you want it to perform. In this case, clicking on the switches will control what you want the LEDs to do. They can each be turned on, turned off, or left alone (designated by a red-striped switch cover). For this example, we'll turn the left LED on and the middle and right LEDs off.
Next, click on the green checkmark. (The green checkmark always means "yes", "okay", or "true". The red "X" always means "no", "not okay", or "false".) When you've done this, the tile will nestle into place on the worksheet, reflecting the action you've chosen. At this point, you have a real program that actually does something: it turns the lefthand LED "on".

Uploading a Program

To try out your new program, you will need to connect the S2 to your computer's serial port. Once you've done this, turn on the S2's power switch. You should be holding onto the S2 when you do this, or else have it sitting on a block of some sort, so its wheels are not in contact with anything. This is in case the program currently loaded causes the wheels to turn. You don't want your S2 rolling off the table!

Next click the upload button, as shown here. Your program will then be transfered to the S2. When it's finished, it will begin executing automatically. In this case, you should see the lefthand LED come on.

Editing a Program

But suppose what you really wanted was the righthand LED to come on. No problem! You can add, change, or delete tiles in your program until it's just the way you want it. There are a couple ways to select a tile to edit:

1. You can click on the select button (pointing finger), then click on the tile(s) you want to select. Just continue clicking on tiles to add to the selection. If you find you've selected too many, you can start over with a double-click on any tile to select it by itself. There are some limitations to this, however. You can't select part of a program block that includes just one of its boundaries. For example, if you tried to select just the "start program" tile, you'd end up selecting the entire program. This is to ensure that you don't delete incomplete program blocks, leaving behind a malformed program. It's part of S2's guarantee that your program will never contain errors.

2. You can right-click on any tile at any time to select it. This also automatically clicks the select button for you, so you can continue to select more tiles or edit the one(s) selected.

Once a tile or group of tiles has been selected, you can right-click on it to bring up the edit menu, as shown here. The edit menu contains buttons for copying to the clipboard (the two green tiles), cutting to the clipboard (the scissors) and deleting (the trashcan). Each of these will light up when you select it, and you can select only one. To cancel a selection, just click on it again. To make the selected action take place, click the "okay" button (the green checkmark).

If you've selected just one tile, or a single syntactic group of tiles, such as a loop or conditional (covered later), there will also be a button on the far left which displays the type of tile or group selected. When you click on this button, the original edit screen for the tile or group comes up, enabling you to change its contents.

For the sake of this example, rather than editing the tile that's there, we're going to copy and paste it, then edit the copy. So first click on the copy button, then the "okay" (green checkmark) button. This copies the selected tile(s) to the clipboard. It also automatically selects the clipboard for insertion.
With the clipboard selected, move the mousepointer just below the original LED tile, and click. A clone of that tile will be inserted into position from the clipboard. You can think of the clipboard as just another tile (or group of tiles) to be inserted. And, as with single tiles, the program will not let you insert tiles from the clipboard into places they don't belong.
Now right-click on the cloned tile to select it, and again to bring up the edit menu. But this time click the LED button at the far left of the menu. This will cause the LED configuration menu to pop up once again.
Here, you can click on the switches to change which LEDs you want to turn on or off. In the example, the left LED is turned off, the center one remains unchanged, and the right one is turned on. Once you click "okay", here is what results:
If you were to upload this program to the S2, you would probably only see the righthand light come on. The lefthand light from the first tile would flash on so briefly that you wouldn't even be able to see it.
So you might as well just get rid of the first tile. To do so, select it and then right-click to bring up the edit menu. Click on the delete (trashcan) button. You could also click on the cut (scissors) button, and the effect would be the same, except that the deleted item would also be copied to the clipboard.

Saving a Program

Here's what's left after the delete. You can save this file to the hard drive for later retrieval simply by clicking the save file button, as shown. This will bring up a file save dialog box that will let you choose a name for your file and select a location to store it.

Clearing the Worksheet

Once your program is saved (or if you don't care if it gets zapped), you can clear the worksheet and start fresh. Just click the new worksheet button, as shown.

Loading a Program

To reload your program, or to load a different one into the worksheet, click the load file button, as shown. A dialog box will come up which will let you select which program you want to load.

Restoring the Factory Program

To restore the program the S2 came loaded with, plug the serial cable into the S2's programming port and turn the S2 on. Then click the restore button. The S2's factory program will then be uploaded. This operation has no effect on the current worksheet.

Calibrating the S2

Currently, the need for an S2 calibration program has not been established. However, this calibration button has been retained as a placeholder in the event one is made available.

Monitoring Sensors

The monitor button will give you access to the real-time sensor monitoring program. Make sure your S2 is powered up and connected to your PC, then click on the button, as shown, to transfer to the monitor program.

When the monitor program starts, you will be standing inside the S2, just behind the doors to the Sensor Observation Deck, waiting for them to open.

If the monitor program is unsuccessful in contacting the S2, the doors won't open, and a red light will flash, as shown to the left. If this happens, double check to make sure the S2 is turned on, has fresh batteries, and is connected to your computer. Then try again.

However, if the monitor program is able to contact the S2, the doors will slide open, and you will be able to see what's happening inside the Sensor Observation Deck.

Once on deck, you will notice lights flashing and a large display screen. The flashing lights are the obstacle detector LEDs. Each side flashes in turn, and the little rectangular sensor in the center watches for a reflection from an obstacle on that side. If it sees one, a wall is shown in the lefthand panel of the display, as illustrated below. (Note: In the S2, the LEDs actually emit infrared light, which is invisible to humans. But its sensor can see infrared, so is able to detect the reflections.)

The line sensor consists of two infrared LEDs and their associated detectors. The display shows the current state of the line sensor in the righthand panel. In the picture below, the righthand sensor is picking up a reflection; the lefthand one is not.

The light sensors reside behind the three oval holes near the top. As the light received by the S2 changes, these holes will brighten and darken in response. Also, the three bargraphs in the center panel of the display will rise and fall, and their associated numbers will change. You can use these numbers in your programs as settings for the light detector.

IMPORTANT NOTES:

  • While the monitor program is running, you will not be able to upload any other programs to the S2. If you try, you will get an error message. To upload another program, first exit the monitor program by clicking the "X" in its upper righthand corner.
  • After the monitor program exits, any program that was loaded before you started the monitor will have to be reloaded.
  • If the monitor program loses communication with the S2, its display screeen will go blank. When communication is restored, the screen will again display sensor status.
Oh, and one more thing: the Sensor Observation Deck is a busy place. Don't expect things to be the same every time you visit!

Help and Tooltips

To bring up this help file, you most likely clicked the help button, as shown. If the help button is lighted, the tooltip system is also enabled. Tooltips are little balloon boxes that pop up occasionally when you linger on a button or control for awhile. They're designed as reminders about what each control does. Once you become familiar with the program's functions, these tooltips may seem more annoying than helpful. In that case you can simply turn them off with a right-click on the help button. Another right-click will turn them back on, and so forth.

For more detailed help, and for the latest information about the S2 and its software, visit the S2 website at www.ScribblerRobot.com.