Icons & Hints | Examples |
Hints: Use this fork if you want to take different courses of action based on a touch sensor. A fork merge is required at some point after this icon. | This piece of code would turn on motor A. If, after 4 seconds, the touch sensor is pushed, the RCX will play a sound and shut off the motor. Otherwise, the motor will just be turned off (no sound). |
Hints: Use this fork if you want to take different courses of action based on a temperature sensor. A fork merge is required at some point after this icon. | This piece of code waits one second and reads the temperature. If the temperature is 30 degrees Celsius or less, it will play a sound. |
Hints: Use this fork if you want to take different courses of action based on the value of a container. A fork merge is required at some point after this icon. | This piece of code fills a container with a random number. If that number is less than the number specified by the compare to control, the RCX plays a sound. |
Hints: Use this fork if you want to take different courses of action based on the value of a timer. A fork merge is required at some point after this icon. | This piece of code turns on lamp a for a random amount of time, and then turns it off. If the time is less than 3 seconds, the RCX plays a sound. |
Hints: Use this fork if you want to take different courses of action based on a touch sensor. A fork merge is required at some point after this icon. | This piece of code would turn on Motor A. If, after 4 seconds, the NXT touch sensor is pushed, the RCX will play a sound and shut off the motor. Otherwise, the motor will just be turned off (no sound). |
Hints: Use this fork if you want to take different courses of action based on volume, as read by the NXT sound sensor fork. A fork merge is required at some point after this icon. | This piece of code checks the value of the NXT sound sensor. If the volume is greater than 40, a sound is played; if it is less than 40, Motor A runs in reverse for two seconds. It then jumps back to the beginning of the code to start again. |
Hints: Use this fork if you want to take different courses of action based on distance from the sensor (in cm), as read by the NXT distance sensor fork. A fork merge is required at some point after this icon. | This piece of code runs Motor A in reverse if the distance sensor reads a value of less than 10. It continues going backward (because of the red jump and land) until the distance sensor reads a value greater than 10, in which case it will run Motor A forward until a distance of 10 is reached again. This process continues over-and-over. |
Hints: Use this fork if you want to take different courses of action based on the NXT rotation sensor. A fork merge is required at some point after this icon. | This program waits 1 second, then if the rotation sensor on Port A reads less than 720 degrees, Motor A goes forward at a speed of 20. This continues (because of the red jump and land) until the rotation sensor reads above 720 degrees, in which case it will stop Motor A, play a sound, and reset the angle sensor to zero. |
Hints: Use this fork if you want to take different courses of action based on a light sensor. A fork merge is required at some point after this icon. | This piece of code turns on Motor A for 4 seconds if the NXT light sensor (on Port 2) reads a value of below 55. If the value is greater than 55, a sound is played. |
Hints: Use this fork if you want to take different courses of action based on the number of clicks on a touch sensor. A fork merge is required at some point after this icon. Also, a zero clicks sensor command should be used sometime before this icon. | This piece of code first resets the click counter to zero. It then turns on Motor A for 10 seconds, and will shut it off for two seconds if the click counter has a value of less than 5. If it is greater than five, it plays a sound. It then jumps back to the beginning and starts again. |
Hints: Use this fork if you want to take different courses of action based on the number of touches and releases on a touch sensor. A fork merge is required at some point after this icon. Also, a zero touch and release sensor command should be used sometime before this icon. | This piece of code turns on Motor A for 4 seconds, and if the touch and release sensor reads a value of greater than 10, it will stop the motor. If the value is less than 10, it will first play a sound and then stop the motor. |
Hints: Use this fork if you want to take different courses of action based on a light sensor. A fork merge is required at some point after this icon. | This piece of code turns on lamp A for 4 seconds if the light sensor reads a value of below 55 (the default). |
Hints: Use this fork if you want to take different courses of action based on a temperature sensor. A fork merge is required at some point after this icon. | This piece of code turns on motor A for 4 seconds. The direction is determined by the temperature. If it reads above 80 degrees, the motor will go forward. Otherwise, it will go in reverse. |
Hints: Use this fork if you want to take different courses of action based on the value of the mailbox. A fork merge is required at some point after this icon. Also, an empty mailbox command should be used sometime before this icon. | This piece of code would empty the mail box. After ten seconds, it checks to see if it has received mail whose value is greater than 1 (the default). If it has, the RCX plays a sound. |
Hints: Use this fork if you want to take different courses of action based on a rotation sensor. A fork merge is required at some point after this icon. Also, a zero angle sensor command should be used sometime before this icon. Reminder: rotation sensor reads in sixteenths, so a reading of 16 equals one rotation. Rotation can be either forward or backward. | This program zeros the angle sensor then waits 10 seconds. If at that point the rotation sensor reads greater than 1 rotation (a reading of 16), then the RCX plays a sound. |
Hints: Use this fork if you want to take different courses of action based on the number of clicks on a touch sensor. A fork merge is required at some point after this icon. Also, a zero clicks sensor command should be used sometime before this icon. | This piece of code turns on motor A for 10 seconds, then shuts it off. If after 10 seconds the touch sensor has been clicked more than 10 times, it plays a sound. |
Hints: Use this fork if you want to take different courses of action based on the number of touches and releases on a touch sensor. A fork merge is required at some point after this icon. Also, a zero touch and release sensor command should be used sometime before this icon. | This piece of code turns on motor A for 10 seconds, and then shuts it off. If after 10 seconds the touch sensor has been touched and releases more than 10 times, it plays a sound. |
Hints: Use with Investigator commands. Use this fork if you want to take different courses of action based on the number of points gathered. A fork merge is required at some point after this icon. | This piece of code logs light sensor data points for a random time. If after that time there are 5 (the default) or fewer data points, it logs data for 2 more seconds before stopping. If after the random time there are greater than 5 data points, it stops logging points. |
Hints: Use this fork if you want to take different courses of action based on the value of the RCX clock. A fork merge is required at some point after this icon. | This piece of code would check the value of the RCX clock. If the clock read 1 minute (the default) or less, then motor A would turn on for 8 seconds. |
Hints: Use this fork if you want to take different courses of action based on the value of the camera sensor. A fork merge is required at some point after this icon. | This piece of code would turn on motor A for 4 seconds, then turn it off. The direction of the motor is determined by the value of the camera sensor. If the camera value is over 55 (the default), the motor goes forward. Otherwise, the motor goes in the reverse direction. |
Hints: Use this if you want different courses of action to be decided on randomly. A fork merge is required at some point following this icon. | This piece of code would turn on motor A for 4 seconds. The direction would be decided on randomly. |
Hints: ALWAYS needed at the end of a fork. | This piece of code would turn on motor A for 4 seconds. The direction would be decided on randomly. |
Hints: Use this fork if you want to take different courses of action based on the value of a generic sensor adapter. A fork merge is required at some point after this icon. | This piece of code would play a sound if the value of the generic sensor adapter was less than or equal to 2 volts (the default). |
Hints: Use this fork if you want to take different courses of action based on the value of a humidity sensor. A fork merge is required at some point after this icon. | This piece of code would play a sound if the value of the humidity sensor was less than or equal to 50% (the default). |
Hints: Use this fork if you want to take different courses of action based on the value of a pH sensor. A fork merge is required at some point after this icon. | This piece of code would play a sound if the value of the pH sensor was less than or equal to 7 (the default). |
Hints: Use this fork if you want to take different courses of action based on the value of a pressure sensor. A fork merge is required at some point after this icon. | This piece of code would play a sound if the value of the pressure sensor was less than or equal to 100 kPa (the default). |
Hints: Use this fork if you want to take different courses of action based on the value of a sound level sensor. A fork merge is required at some point after this icon. | This piece of code would play a sound if the value of the sound level sensor was less than or equal to 60 dB (the default). |
Hints: Use this fork if you want to take different courses of action based on the value of a temperature sensor. These temperatures are in CELSIUS. A fork merge is required at some point after this icon. | This piece of code would play a sound if the value of the temperature sensor was less than or equal to 30 degrees Celsius (the default). |
Hints: Use this fork if you want to take different courses of action based on the value of a position sensor. A fork merge is required at some point after this icon. | This piece of code would play a sound if the value of the position sensor was less than or equal to 180 degrees (the default). |
Hints: Use this fork if you want to take different courses of action based on the value of a voltage sensor. A fork merge is required at some point after this icon. | This piece of code would play a sound if the value of the voltage sensor was less than or equal to 2 volts (the default). |
Hints: Use this fork if you want to take different courses of action based on a temperature sensor. A fork merge is required at some point after this icon. | This piece of code waits one second and reads the temperature. If the temperature is not 30 degrees Celsius (the default), it will play a sound. |
Hints: Use this fork if you want to take different courses of action based on the value of a container. A fork merge is required at some point after this icon. | This piece of code fills a container with a random number. If that number is not equal to 1 (the default), the RCX plays a sound. |
Hints: Use this fork if you want to take different courses of action based on the value of a timer. A fork merge is required at some point after this icon. Reminder: Comparison value is measured in tenths of seconds. | This piece of code turns on lamp a for a random amount of time, and then turns it off. If the time is not equal to 5 seconds (the default), the RCX plays a sound. |
Hints: Use this fork if you want to take different courses of action based on a light sensor. A fork merge is required at some point after this icon. | This piece of code turns on motor A. If the light sensor does not read a value of 55, then the RCX plays a sound. After 2 seconds, the motor is shut off. |
Hints: Use this fork if you want to take different courses of action based on a temperature sensor. A fork merge is required at some point after this icon. | This piece of code waits one second and reads the temperature. If the temperature is not 80 degrees Fahrenheit (the default), it will play a sound. |
Hints: Use this fork if you want to take different courses of action based on the value of the mailbox. A fork merge is required at some point after this icon. Also, an empty mailbox command should be used sometime before this icon. | This piece of code empties the mailbox and then waits 10 seconds. If after those 10 seconds the mailbox has a value of 1 (the default), the RCX plays a sound. |
Hints: Use this fork if you want to take different courses of action based on a rotation sensor. A fork merge is required at some point after this icon. Also, a zero angle sensor command should be used sometime before this icon. Reminder: rotation sensor reads in sixteenths, so a reading of 16 equals one rotation. Rotation can be either forward or backward. | This piece of code zeros the angle sensor. If after 10 seconds the angle sensor reads 16 (one rotation, the default), then the RCX plays a sound. |
Hints: Use this fork if you want to take different courses of action based on the number of clicks on a touch sensor. A fork merge is required at some point after this icon. Also, a zero clicks sensor command should be used sometime before this icon. | This piece of code zeros the click sensor. If after 10 seconds the click sensor reads 10 (the default), the RCX plays a sound. |
Hints: Use this fork if you want to take different courses of action based on the number of touches and releases on a touch sensor. A fork merge is required at some point after this icon. Also, a zero touch and release sensor command should be used sometime before this icon. | This piece of code zeros the touch and release sensor. If after 10 seconds the touch and release sensor reads 10 (the default), the RCX plays a sound. |
Hints: Use this fork if you want to take different courses of action based on a light sensor. A fork merge is required at some point after this icon. | This piece of code turns on motor A. If the light sensor does not read a value of 55, then the RCX plays a sound. After 2 seconds, the motor is shut off. |
Hints: Use this fork if you want to take different courses of action based on the volume of a room, as measured by the NXT sound sensor. A fork merge is required at some point after this icon. | This piece of code turns on motor A. If the sound sensor does not read a value of 55, then the RCX plays a sound. After 2 seconds, the motor is shut off. |
Hints: Use this fork if you want to take different courses of action based on the volume of a room, as measured by the NXT sound sensor. A fork merge is required at some point after this icon. | This piece of code turns on Motor A in reverse if the volume is not equal to 10. If the volume is equal to 10, a sound is played. The code then jumps back to the beginning to start again. |
Hints: Use this fork if you want to take different courses of action based on a rotation sensor. A fork merge is required at some point after this icon. | This piece of code will turn Motor A on at Power Level 10 for 1 second if the value of the rotation sensor is not equal to 720. If it is equal to 720, Motor A will stop for 1 second, and a sound will played. This code then jumps back to the beginning to begin again. |
Hints: Use this fork if you want to take different courses of action based on the number of clicks on a touch sensor. A fork merge is required at some point after this icon. | This piece of code will turn Motor A on at Power Level 10 for 1 second if the value of the click count sensor is not equal to 10. If it is equal to 10, Motor A will stop for 1 second, a sound will played, and the click sensor will be reset to zero. This code then jumps back to the beginning to begin again. |
Hints: Use this fork if you want to take different courses of action based on the number of touches and releases on a touch sensor. A fork merge is required at some point after this icon. | This piece of code will turn Motor A on at Power Level 10 for 1 second if the value of the touch and release sensor is not equal to 10. If it is equal to 10, Motor A will stop for 1 second, a sound will played, and the touch and release sensor will be reset to zero. This code then jumps back to the beginning to begin again. |
Hints: Use with Investigator commands. Use this fork if you want to take different courses of action based on the number of points gathered. A fork merge is required at some point after this icon. | This piece of code logs light sensor data points for 6 seconds. If after that time there are not 5 (the default) data points, the RCX plays a sound before stopping. If after the 6 seconds there are 5 data points, it stops logging points (no sound). |
Hints: Use this fork if you want to take different courses of action based on the value of the RCX clock. A fork merge is required at some point after this icon. | This piece of code would check the value of the RCX clock. If the clock did not read 1 minute (the default), then motor A would turn on for 8 seconds. |
Hints: Use this fork if you want to take different courses of action based on the value of the camera sensor. A fork merge is required at some point after this icon. | This piece of code would turn on motor A for 4 seconds, then turn it off. The direction of the motor is determined by the value of the camera sensor. If the camera value is 55 (the default), the motor goes forward. Otherwise, the motor goes in the reverse direction. |
Hints: Use this fork to take different actions based on whether an event has occurred or not. Useful if you are monitoring for multiple events and wish to take different actions for different events. | This piece of code (part of a larger program) would play a D note if the red event had occurred. If the red event had not occurred it would play an E note. |
Hints: Use this fork to take different actions based on whether the Timer (reading in hundredths of a second) is greater than or less than or equal to to an amount of time. | This piece of code will beep for 600 hundredths of a second (6 seconds) and then jump to the blue land. |
Hints: Use this fork to take different actions based on whether the Timer (reading in hundredths of a second) is equal to an amount of time or not. | This piece of code (part of a larger program) will add 1 to the container while the timer (reading in hundredths of seconds) is not equal to 600. The value of the container is shown on the display. |