20/01/2007

 My Block - Is left further than right?

This is the tutorial to build a my block "Is left further than right". The robot makes out whether of not the objects located on his left are further than on his right.  Therefore the robot turns first left register the distance and stores it into a variable "LeftSensor", then it turns right register the distance again and compares it with the variable “LeftSensor”. 

 

To make a “my block” you just start up a new program.  Once the program is completed you select the part of it you want to be reusable.  The variables that are outside your selection but where data are coming in or out become the input or output variables of your program.

 

So lets start, open a new program.

Select Edit  - Define variable – Define the variables: Input, Left sensor and Output.

 

 

image012
 
 
image013
 
 
image014
 
 

image016

 

 

image016

 

image017
 
 
image018
 
 
image022

 
 
 
image020
 

 
image023
 
Select Edit- Make a new My block
 
 
image025
 
 
Folow the wizard and click Finish.
 
 
Have fun.
 
Bye

16:15 Écrit par Geoffrey Vandiest dans Web | Lien permanent | Commentaires (0) |  Facebook |

Les commentaires sont fermés.