Recent Changes - Search:

TEAMS Academy Wiki


Explore TEAMS!
for visiting sophomores & juniors


Robotics

EnvBioTech

Bat Design

Assistive Tech

Students

Instructors

TEAMS Forum

TEAMS Calendar

TEAMS Web Site

Wiki Info

edit Explore.SideBar

The Number Blocks & What they Do

Back to main page

Here's a description of some of the more useful number blocks...

number Allows you to select a number

random Randomly selects a number for you

less than comparison Compares two values to see if the left value is less than the right value. Can use numbers, random numbers, or sensor data values. Usually used with waituntil, if, or a similar control command.

equal to comparison Compares two values to see if the left value is equal to the right value. Can use numbers, random numbers, or sensor data values. Usually used with waituntil, if, or a similar control command.

greater than comparisonCompares two values to see if the left value is greater than the right value. Can use numbers, random numbers, or sensor data values. Usually used with waituntil, if, or a similar control command.

and Tests whether two conditions are both true, such as "Are both the touch sensors pressed?" or "Is the touch sensor pressed and the IR sensor seeing white?" Usually used with waituntil, if, or a similar control command.

or Tests whether one of two conditions is true, such as "Are both the touch sensors pressed?" or "Is the touch sensor pressed and the IR sensor seeing white?" Usually used with waituntil, if, or a similar control command.

basic operations Allow you to add, subtract, multiply or divide two numbers. You can enter a number, have a random number selected, or use sensor data value here as well.


Here's an example!

This Lego Block code will...

  • Tell the Cricket to wait until the value of the sensor attached to port A is less than 10
  • Turn on motor A for 20 tenths of one second
Edit - History - Print - Recent Changes - Search
Page last modified on March 09, 2008, at 05:14 PM