is a programming environment for learning and programming the robot. applies a visual drag-and-drop programming style, easy and intuitive for learning. Full window...
Shapes Programming ApplicationThe full application contains the following parts:
This program does a simple printing of "Hello world!" to the robot screen.
The program cause the led on the robot controller to blink. The blinking is implemented by turning the led on for 1 second (by writing 1 to it), then turn it off for 1 second. Selecting the infinite loop (top right on the toolbar) causes the continued blink. The delay instruction sets a time (in seconds) to wait before executing the next instruction.
Blink in a loop
In this program we cause the led to blink 4 times only, using the repeat instruction: the number set at the top part states how many times to execute the instructions contained within the repeat instruction block.
Print channel value
Print channel 1 value to the robot screen.
Turning on the motors: forward
Moving forward by giving both motors - motor 1 and motor 2 - same value: 100 (electrical power percentage).
Turn left by turning on the right motor only - the robot will turn around its left wheel.
Turn right for 5 seconds
This program uses the delay instruction - the robot turns right in place for 5 seconds by setting opposite values to both motors, and by using a delay instruction for 5 seconds. The motors then are sopped by setting their values to 0.
Move forward and stop on obstacle
The robot moves forward and stops when an obstacle is detected. A proximity sensor is set in front of the robot and connected to channel 1.
Math: a robot quiz
This program displays the user several math questions, letting him a short time to answer, and then displays the right answer.
A variable is a memory cell where values can be stored. Variables are used to store values for later use, and to ease the editing of programs with repeating values. In this program, the value of channel 1, to which a light sensor is connected, is read into a variable, which is then printed to the robot screen. Then, if the value is less than the darkness value (set in another variable), print "It's dark!".
Functions let the user write modular programs. The program part within a function can be executed from anywhere in the program by calling that function.
In this program a function named "left" is defined with 1 parameter - speed, and turns left by setting motor 1 to "speed" and motor 2 to "-speed". The function the is called with value 75, which causes the robot to turn left in place with speed 75.