Knowledgebase Home > 2. Software > ROBOLAB > Programming Samples | Contact Knowledgebase Home | Contact
Search the Knowledgebase Browse by Category
Programming Samples
There were 14 questions found in this category:
  1. Construct a simple car using an angle sensor as a controller.
    Part 2: In Investigator level 5, program your car so that the motor speed (and direction) is determined by the angle sensor's value. The value of the angle sensor can be multiplied or divided for different levels of control. Part 3: Modify the program to include commands to log rotation sens...

  2. Create a pair of RCX to RCX communication programs, using mail to remotely control a vehicle.
    1. Have RCX1 beep and wait for the touch sensor. After the touch sensor is pushed in it sends mail to RCX2. 2. Have RCX2 turn Motor A on for 2 seconds when it receives the mail from RCX1. ses

  3. Create a program in Investigator that can run two tasks at the same time.
    1. The first task acquires light sensor data every 2 seconds while Motor A runs at half speed until the touch sensor is pushed in. Then Motor A shuts off and the data collection stops.2. The second task turns on Lamp C at low power and increases the power level every 2 seconds. Lamp C turns o...

  4. Create a program that can send large values through the RCX mail system.
    Mail values are limited to 255.  However, the program below is a sample of a simple method to get around that.This is the send program:This is the receive program:The program breaks the big number into three two digit sections and then puts it back together on the other side.  The program ...

  5. Create a program that continually checks to see if the light level is at or below 50.
    If it is 50 or below, Lamp A is turned on at full power, and if it is above 50, Lamp A is off. ses

  6. Create a program that will use the touch sensor to control the direction of the motors.
    Use loops so that you can make your motors switch directions every time you press the touch sensor. Change the value "20" to the number of loop cycles you require. ses

  7. Create an echo-locator.
    Similar to a bat with a sonar echo locator, this program uses light to measure distance, with sound as a feedback. Using your RCX or NXT, and a light sensor, develop your own echo locator.Part 1:  This program should use the light sensor value to determine the frequency of the note ...

  8. Create an RCX car / creature that will play laser tag with other cars / creatures.
    Each RCX will be assigned a number. It will then have to "tag" other RCXs with the number using mail, while avoiding tags from other competitors. After 5 tags from a competitor's RCX, you take on that RCX's number. The winner is the RCX that has given its number to all the other RCXs. Part A: Bui...

  9. How can a program be written to tell the difference between even and odd numbers?
    It would be possible to have the RCX or NXT count up to the number with a container, toggling between even and odd, but that wouldn't be as rapid a solution for very large values to test. This part of the program tests whether or not the value in the red container is even or odd.  The yell...

  10. How can I gradually increase the power level sent to the motors?
    This program increases the power level setting to motors A and C in certain time intervals, set to 0s in this example (program in inventor). (Note: you may alternatively use the "wait for 1s" block instead of the "wait for time" assigned to 1s with the constant attached.) Set the time between power-...

  11. Is it possible to plug a motor into the input ports?
    Yes, on the RCX. The motors can be treated as sensors.The NXT motors can be used as sensors while plugged into an output port. By clicking on the NXT comands icon, in the new Robolab software, a selection of "Value of" icons will be avaible for output ports A, B, and CBy connecting a motor ...

  12. Program a car to drive when the lights are off and stop when the lights are turned back on.
    One possible solution is below: ses

  13. Run motor A for 10s.
    ses

  14. Write a program to make a car drive forward until the touch sensor has been pressed 4 times.
    Use the "Loop While Number of Touches and Releases is Less Than" icon. A sample solution is below.Note: the modifier is 8 because 4 depressions of the touch sensor also includes 4 releases.ses


Powered by ActiveKB Knowledgebase Software