Icons & Hints | Examples |
Hints: Use this command to fill a container with a value of your choice which can be controlled by a modifier. The default is to set the Red Container to a value of 1. | This piece of code first zeroes the container, then fills the Red Container with a value of 2. A sound is played, and then the motor is run at the speed of the Red Container, which is 2. |
Hints: Use this command to fill a container with the absolute value of a number. The default is to put the absolute value of zero into the Red Container. | This piece of code takes absolute value of whatever is put into the container. In this case, the absolute value of -2 is put into the Blue Container, and the RCX will display 2. |
Hints: This command ANDs a bitwise value to the bitwise value of the container. This is NOT a Boolean operation. | This piece of code fills the Red Container with a value of 5. It then ANDs that number with 1. The resulting number after the bitwise operation is 1. In this example, in binary 5 = 0101, and 1= 0001. The binary AND operation yields 0001, which equals 1.
|
Hints: This command ORs a bitwise value to the bitwise value of the container. This is NOT a Boolean operation. | This piece of code fills the Red Container with a value of 5. It then ORs that number with 1. The resulting number after the bitwise operation is 5. In this example, in binary 5 = 0101, and 1= 0001. The binary OR operation yields 0101, which equals 5. |
Hints: Use this command to put the sign (positive or negative) into a container. The default is to put a zero in the Red Container. | This piece of code takes the sign of the number you put into the container. In this case, -1 is put into the Blue Container. The RCX will then display -1. If the number was 2, then 1 would be put into the container. |
Hints: Use this command to add a value to the current value of the container. The default is to add one to the Red Container. | This piece of code fills the Blue Container with a value of 1. It then ADDs 2 to the Blue Container. The value of the Blue Container would then be displayed on the RCX as 3. |
Hints: Use this command to subtract a value from the current value of the container. The default is to subtract one from the Red Container. | This piece of code fills the Blue Container with a value of 1. It then SUBTRACTs 2 from the Blue Container. The value of the Blue Container would then be displayed on the RCX as -1. |
Hints: Use this command to multiply the value of a container by a certain number. The default is to multiply the Red Container by two. | This piece of code fills the Blue Container with a value of 1. It then MULTIPLYs 2 by the value of the Blue Container. The value of the Blue Container would then be displayed on the RCX as 2. |
Hints: Use this command to divide the value of a container by a certain number. The default is to divide the Red Container by two. User can only use integers (1,2,3....). Non-integer numbers will be rounded to the nearest integer. The result also can only be an integer. Non-integer results will be truncated (the decimal part of the number will be removed). | This piece of code fills the Blue Container with a value of 1. It then divides the value of the Blue Container by 2. The value of the Blue Container would then be displayed on the RCX as 0 (0.5 truncated = 0). |
Hints: Use this command to fill a container with the value of the touch sensor. This value will either be a zero or a one. The default is to set the Red Container to the value of the touch sensor on port 1. In your program, be sure to specify what port your touch sensor is connected to with a modifier. | This piece of code fills the Red Container with the value of the touch sensor. A sound is played and the value of the Red Container is shown on the RCX. If the value of the touch sensor was 1 (meaning it was pressed in), the RCX would read 1. |
Hints: Use this command to fill a container with the value of the light sensor. The default is to set the Red Container to the value of the light sensor on port 1. In your program, be sure to specify what port your light sensor is connected to with a modifier. | This piece of code fills the Yellow Container with the value of the light sensor. A sound is played and the value of the Yellow Container is shown on the RCX. If the value of the light sensor was 41, the RCX would read 41. |
Hints: Use this command to fill a container with the value of the temperature (Celsius) sensor. The default is to set the Red Container to the value of the temperature sensor on port 1. In your program, be sure to specify what port your temperature sensor is connected to with a modifier. Rounds value to nearest integer value (20.7 goes to 21). | This piece of code fills the Red Container with the value of the temperature sensor in Celsius. A sound is played and the value of the Red Container is shown on the RCX. If the value of the sensor was 25 deg, the RCX would read 25. |
Hints: Use this command to fill a container with the value of the temperature (Fahrenheit) sensor. The default is to set the Red Container to the value of the temperature sensor on port 1. In your program, be sure to specify what port your temperature sensor is connected to with a modifier. Rounds value to nearest integer value (70.7 goes to 71). | This piece of code fills the Generic Container with the value of the temperature sensor in Fahrenheit. A sound is played and the value of the Generic Container is shown on the RCX. If the value of the sensor was 75 deg, the RCX would read 75. |
Hints: Use this command to fill a container with the value of the rotation sensor. The default is to set the Red Container to the value of the rotation sensor on port 1. In your program, be sure to specify what port your rotation sensor is connected to with a modifier. | This piece of code fills the Red Container with the value of the Rotation sensor. A sound is played and the value of the Red Container is shown on the RCX. If the value of the sensor was 8, the RCX would read 8. |
Hints: Use this command to fill a container with the value of the mailbox. The default is to set the Red Container to the value of the mailbox. | This piece of code fills the Red Container with the value of the mailbox. A sound is played and the value of the Red Container is shown on the RCX. If the value of the mail was 2, the RCX would read 2. |
Hints: Use this command to fill a container with the value of the timer. The default is to set the Red Container to the value of the red timer. You can use modifiers to determine what container you're using as well as what timer value you're using. | This piece of code fills the Red Container with the value of the timer. A sound is played and the value of the Red Container is shown on the RCX. If the value of the sensor was 10, the RCX would read 10. |
Hints: Use this command to fill a container with the value of the Timer (.01) reading time in hundredths of seconds. | This piece of code zeros the red time beeps and then puts the value of the Timer (.01) reading in hundredths of seconds into the red container. It then show the value of the red container on the display for 2 seconds. (In general it takes 100-110 hundreds of a second to play the beep). |
Hints: Use this command to convert a floating point number into an integer to store in a regular ROBOLAB container. | This code zeros the rotation sensor on port 1, then it runs motor A forward for 4 seconds and turns off the motor. The value of the rotation sensor on port 1 in a container that is named rotations. Then the rate is computed by dividing the rotations by 4 (the number of seconds the motor ran). Next, the rate is place in the red container. Finally, this value is displayed on the RCX. |
Hints: This VI allows you to name a variable and set it equal to a numeric constant or the value of any modifier. | This code zeros the rotation sensor on port 1, then it runs motor A forward for 4 seconds and turns off the motor. The value of the rotation sensor on port 1 in a container that is named rotations. Then the rate is computed by dividing the rotations by 4 (the number of seconds the motor ran). Next, the rate is place in the red container. Finally, this value is displayed on the RCX. |
Hints: Use this command to fill a container with the value of the NXT light sensor. The default is to set the Red Container to the value of the NXT light sensor on port 1. In your program, be sure to specify what port your NXT light sensor is connected to with a modifier. | This piece of code takes the current value of the NXT light sensor on port 4 and places it in the red container. That value is then multiplied by 10 and used as the frequency for a quarter note. |
Hints: Use this command to fill a container with the value of the NXT touch sensor. The default is to set the Red Container to the value of the NXT touch sensor on port 1. In your program, be sure to specify what port your NXT touch sensor is connected to with a modifier. | This piece of code takes the current value of the NXT touch sensor on port 1 and places it in the red container. It uses this value to determine the number of loops to run. Because the touch sensor will either read 1 (pressed) or 0 (not pressed), this program will either play a note once or not at all. |
Hints: Use this command to fill a container with the value of the NXT distance sensor. The default is to set the Red Container to the value of the NXT distance sensor on port 1. In your program, be sure to specify what port your NXT distance sensor is connected to with a modifier. | This piece of code initializes the NXT distance sensor on port 4. It then enters a jump where it will continuously take the value of the distance sensor on port 4 and place it into a container, multiply that by 5, and use that value as the power level for motor A. This will allow the NXT to follow an object in front of it. |
Hints: Use this command to fill a container with the value of the NXT sound sensor. The default is to set the Red Container to the value of the NXT sound sensor on port 1. In your program, be sure to specify what port your NXT sound sensor is connected to with a modifier. | This piece of code initializes the NXT sound sensor on port 2. It then enters a jump where it will continuously take the value of the sound sensor on port 2 and place it into the blue container, and use that value as the power level for motor A. This code will make the NXT move quickly when it hears a sound. |
Hints: Use this command to fill a container with the value of the NXT angle sensor. The default is to set the Red Container to the value of the NXT light sensor on port A. In your program, be sure to specify what port your NXT angle sensor is connected to with a modifier. Modifiers for the NXT angle sensors are found in the NXT commands menu. | This piece of code initializes the NXT angle sensor on port A. It then enters a jump where it will continuously take the value of the angle sensor on port A and place it into the yellow container. The absolute value of the yellow container is placed in the red container, which is then multiplied by 10. This value is used as the frequency for a sixteenth note. This code turns the NXT rotation sensor into a musical instrument. |
Hints: This VI allows you to evaluate formulas. This command allows floating point math. You can declare floating point variables using this command. | This code zeros the rotation sensor on port 1, then it runs motor A forward for 4 seconds and turns off the motor. The value of the rotation sensor on port 1 in a container that is named rotations. Then the rate is computed by dividing the rotations by 4 (the number of seconds the motor ran). Next, the rate is place in the red container. Finally, this value is displayed on the RCX. |
Hints: Use this command to fill the container with a random value between zero and a max random number (determined by a modifier). The default is to fill the Red Container with a random number between 0 and 8. | This piece of code fills the Red Container with a random number from 0 to 8. A sound is played and the value of the Red Container is shown on the RCX. If the value of the sensor was 8, the RCX would read 8. |
Hints: Use this command to fill a container with the number of clicks of the touch sensor. The default is to set the Red Container to the number of clicks from the touch sensor on port 1. In your program, be sure to specify what port your touch sensor is connected to with a modifier. | This piece of code fills the Red Container with the number of clicks of the touch sensor. A sound is played and the value of the Red Container is shown on the RCX. If the number of clicks was 3, the RCX would read 3. |
Hints: Use this command to fill a container with the number of touch and releases of the touch sensor. The default is to set the Red Container to the number of touch and releases from the touch sensor on port 1. In your program, be sure to specify what port your touch sensor is connected to with a modifier. | This piece of code fills the Red Container with the number of touch and releases of the touch sensor. A sound is played and the value of the Red Container is shown on the RCX. If the number of touch and releases was 3, the RCX would read 3. |
Hints: Use this command to fill a container with the number of data points collected in a data set. The default is to set the Red Container to the number of data points from the Red Data Set. | This piece of code initializes the touch sensor on Port 1 on the Red Data Set then begins taking data. It waits 10 seconds and then fills the Red Container with the number of points on the Red Data Set after that time. It then displays this number on the RCX and continues to wait until 35 data points are collected on the Red Data Set. |
Hints: Use this command to fill a container with the value of the clock. The default is to set the Red Container to the value of the clock. | This piece of code fills the Red Container with the value of the clock. A sound is played and the value of the Red Container is shown on the RCX. If the value of the clock was 30 minutes(the amount of time the RCX was on), the RCX would read 30. |
Hints: Use this command to fill a container with the result of a mathematical formula. The default is to set the Red Container to a value of one. In order to create a string (the area where the formula is written), you must right click on the lower right hand corner of the icon and click on create constant. You can then type in your formula in the pink box. Formulas can include parentheses. | This piece of code fills the Red Container with the value of the light sensor on port 1. It then divides the value of the Red Container by 10, adds 8 (4 times 2), and then puts the resulting value into the Red Container. This value is then displayed on the RCX. |
Hints: This command sets the container to an event state. The event states are as follows: 0-low, 1-medium, 2-high, 3-undefined, 4-start calibrating, 5-calibrating in process. | This piece of code (where an event was configured earlier) takes the current event state, puts it in the Red Container and displays it on the RCX's LCD and then beeps. This process loops continuously until the event has been triggered. |
Hints: Set the container to a copy of the bit register of the successful event(s) of the current task. The default is to set the Red Container to the register. | This piece of code is a part of a larger program. The Event Register icon lets the user discover what event was triggered and react accordingly. |
Hints: This command sets the container to the value of the camera sensor. The value of the camera sensor is defined by the user in Vision Center. | This piece of code fills the Red Container with the value that is returned from the camera and displays it on the RCX. In order for this icon to work, you must be running Vision Center which can be found under the Project or Tools menu on the ROBOLAB toolbar. |
Hints: This command sets the container to the value of the generic sensor adapter. The default is to set the value of the generic sensor adapter to the Red Container. | This piece of code fills the Red Container with the value of the generic sensor. A sound is played and the value of the Red Container is shown on the RCX. If the value of the generic sensor was 32, the RCX would read 32. |
Hints: Use this command to fill a container with the value of the humidity sensor. The default is to set the Red Container to the value of the humidity sensor on port 1. In your program, be sure to specify what port your humidity sensor is connected to with a modifier. | This piece of code fills the Red Container with the value of the humidity sensor. A sound is played and the value of the Red Container is shown on the RCX. If the value of the humidity sensor was 32, the RCX would read 32. |
Hints: Use this command to fill a container with the value of the pH sensor. The default is to set the Red Container to the value of the pH sensor on port 1. In your program, be sure to specify what port your pH sensor is connected to with a modifier. | This piece of code fills the Red Container with the value of the pH sensor. A sound is played and the value of the Red Container is shown on the RCX. If the value of the pH sensor was 8, the RCX would read 8. |
Hints: Use this command to fill a container with the value of the pressure sensor adapter. The default is to set the Red Container to the value of the pressure sensor adapter on port 1. In your program, be sure to specify what port your pressure sensor adapter is connected to with a modifier. | This piece of code fills the Red Container with the value of the pressure sensor. A sound is played and the value of the Red Container is shown on the RCX. If the value of the pressure sensor was 4, the RCX would read 4. |
Hints: Use this command to fill a container with the value of the sound level sensor. The default is to set the Red Container to the value of the sound level sensor on port 1. In your program, be sure to specify what port your sound level sensor is connected to with a modifier. | This piece of code fills the Red Container with the value of the sound sensor. A sound is played and the value of the Red Container is shown on the RCX. If the value of the sound sensor was 8, the RCX would read 8. |
Hints: Use this command to fill a container with the value of the temperature sensor adapter. The default is to set the Red Container to the value of the temperature sensor adapter on port 1. In your program, be sure to specify what port your temperature sensor adapter is connected to with a modifier. | This piece of code fills the Red Container with the value of the ProTemp sensor. A sound is played and the value of the Red Container is shown on the RCX. If the value of the ProTemp sensor was 8, the RCX would read 8. |
Hints: Use this command to fill a container with the value of the position sensor adapter. The default is to set the Red Container to the value of the position sensor adapter on port 1. In your program, be sure to specify what port your position sensor adapter is connected to with a modifier. | This piece of code fills the Red Container with the value of the position sensor. A sound is played and the value of the Red Container is shown on the RCX. If the value of the position sensor was 8, the RCX would read 8. |
Hints: Use this command to fill a container with the value of the voltage sensor adapter. The default is to set the Red Container to the value of the voltage sensor adapter on port 1. In your program, be sure to specify what port your voltage sensor adapter is connected to with a modifier. | This piece of code fills the Red Container with the value of the voltage sensor. A sound is played and the value of the Red Container is shown on the RCX. If the value of the voltage sensor was 8, the RCX would read 8. |
Hints: Use this command to fill a container with the value of the acceleration sensor. The default is to set the Red Container to the value of the acceleration sensor on port 1. In your program, be sure to specify what port your acceleration sensor is connected to with a modifier. | This piece of code fills the Red Container with the value of the accelerometer. A sound is played and the value of the Red Container is shown on the RCX. If the value of the accelerometer was 8, the RCX would read 8. |
Hints: Use this command to fill a container with the value of the Lux sensor. The default is to set the Red Container to the value of the Lux sensor on port 1. In your program, be sure to specify what port your Lux sensor is connected to with a modifier. | This piece of code fills the Red Container with the value of the LUX sensor. A sound is played and the value of the Red Container is shown on the RCX. If the value of the LUX sensor was 8, the RCX would read 8. |
Hints: Use this command to fill a container with the value of the barometric sensor. The default is to set the Red Container to the value of the barometric sensor on port 1. In your program, be sure to specify what port your barometric sensor is connected to with a modifier. | This piece of code fills the Red Container with the value of the barometer sensor. A sound is played and the value of the Red Container is shown on the RCX. If the value of the barometer sensor was 8, the RCX would read 8. |
Hints: Use this command to fill a container with the value of the Redox sensor. The default is to set the Red Container to the value of the redox sensor on port 1. In your program, be sure to specify what port your redox sensor is connected to with a modifier. | This piece of code fills the Red Container with the value of the Redox sensor. A sound is played and the value of the Red Container is shown on the RCX. If the value of the Redox sensor was 8, the RCX would read 8. |