LogoBlocks lets you create iconic programs to control a Programmable Brick, the yellow RCX. To create programs, you just drag blocks from the palette (on the left of the screen) and snap them together on the canvas (on the right side of the screen). The buttons on the bottom left let you switch between palettes, each containing a different set of commands. All programs must be attached to a purple "hat". For example, create this program:
|
|
This program tells the RCX brick To execute the program, |
When you execute a program (by double-clicking on the purple hat), you will notice lights flashing on the yellow RCX brick and the interface tower, indicating that they are communicating with one another.
Now, connect a motor to the A port on the RCX brick, and create the following program:
|
|
This program (Note: To change the number on a block, simply click on the block and type in the new number when it turns red) |
|
Now add a second motor, connecting it to the B port.
|
||
|
Now connect a touch sensor to sensor port 1.
|
|
This program tells the RCX brick |
Now connect a light sensor to the sensor port 2.
|
|
This program tells the RCX brick |
Note that the purple hat in this program has a green button. This plays a special role in LogoBlocks: it is automatically linked to the green "Run" button on the RCX brick. When you press the Run button, the RCX brick runs the program attached to the purple hat with the green button.
Try the following: Select "Download Code" from the "LEGO RCX" menu to download your program to the RCX brick. Then take the RCX brick away from the computer and press the green "Run" button: the RCX brick should run your program.