lego_inventor

=ROBOLAB Quick Guide - INVENTOR= The following are examples of programming challenges for various levels of ROBOLAB.

Inventor 1
You will need an RCX car with two motors. Attach both motors to Port A.
 * 1) Write a program exactly like the one above.
 * 2) Make Motor A run until the touch sensor is pressed instead of waiting for time.
 * 3) Program the RCX to play a sound after the motor stops.

Extra Challenge
Connect one of the motors to Port C and program your car to drive forward.


 * Return to** **Lego Home** **Page**

Inventor 2
You will need an RCX car with two motors. Attach both motors to Port A.
 * 1) Write a program exactly like the one above.
 * 2) Change the program to make your car go as slowly as possible.
 * 3) Add two different types of beeps to the program. You will need to use modifiers.

Extra Challenge

 * 1) Put one of your motors on Port C and leave the other on Port A. Make both motors start at the same time and then stop at the same time. You can only use one stop sign.
 * 2) Attach a touch sensor to Port 2. Make your motors stop when you press the touch sensor.


 * Return to** **Lego Home** **Page**

Light Sensor
You will need an RCX car with two motors, a light sensor, black electrical tape, and a black piece of construction paper. Attach both motors to Port A. Attach the light sensor to Port 1. Use electrical tape or other dark tape to make a line on the floor. > b. Program your car to drive to the first line, reverse, and then stop when it hits the second line. Make sure you start your car in the middle of the two lines. > b. Program your car to drive and play a beep when it hits a surface lighter than the paper. You will need to take a light reading and add it as a modifier. > c. Position your programmed car in the middle of the paper and run the program.
 * 1) Write a program exactly like the one above.
 * 2) a. Place another line of tape on the floor at least 30 cm (12 in) from the first line.
 * 1) a. Place a piece of dark construction paper on the floor. It should be darker than the floor.

Extra Challenge
Program your car to drive when the lights in the room are turned off and stop when the lights are turned back on. Your car should be able to do this repeatedly.


 * Return to** **Lego Home** **Page**

Touch Sensor
You will need an RCX car with two motors. Attach one motor to Port A and one motor to Port C.
 * 1) Write a program exactly like the one above.
 * 2) Make your motors stop when you press the touch sensor.
 * 3) Write a program that will wait for the touch sensor to be released. Use the 'Wait for Let Go' icon.

Extra Challenge
Use the touch sensor to control the direction of the motors. Use loops so that you can make your motors switch directions every time your press the touch sensor.

Return to Lego Home Page

Jump
You will need an RCX car with two motors. Attach both motors to Port A.
 * 1) Write a program exactly like the one above.
 * 2) What do the Jump icons tell the car to do?
 * 3) Write a program that uses music and the Jump icons.

Extra Challenge
Write a program that uses the touch sensor and the Jump icons.

Return to Lego Home Page

Loop
You will need an RCX car with two motors. Attach both motors to Port A.
 * 1) Write a program exactly like the one above.
 * 2) Program an action before the loop.
 * 3) Write a program using the 'Loop While Touch Sensor is In' icon.

Extra Challenge
Make your car drive forward until the touch sensor has been pressed in four times. You will need to use the 'Loop While Number of Touches and Releases is Less Than' icon.

Return to Lego Home Page

Forks
You will need an RCX car with two motors and a touch sensor. Attach motors to Ports A and C. Attach the touch sensor to Port 1.
 * 1) Write a program exactly like the one above.
 * 2) Add a jump or a loop to the program so that it repeats. //Hint: Put them where the program will let you keep using the touch sensor to control the motor. Add a beep so you will know that the cycle begins again. Use Jumps and Lands or Loops.//
 * 3) Write a program using the 'Timer Fork' icon. You will need to use the 'Zero Timer' icon. Place the Zero Timer icon after the green light.

Extra Challenge
Pretend your motor is a generator. Program your generator to turn on when the light in the room goes off and turn off when the light comes back on.

Return to Lego Home Page

Split Task
You will need an RCX car with two motors. Attach both motors to Port A. > b. Program the motors to do two different things at the same time.
 * 1) Write a program exactly like the one above.
 * 2) Program your car to drive backward before the Task Split icon.
 * 3) a. Move one of your motors to Port C.

Extra Challenge
Think about something you could build besides a car that would do two things at the same time and that would need a split task. What would you build and what two things would it do?

return to Lego Home Page

Subroutine
You will need an RCX car with two motors. Attach both motors to Port A.
 * 1) Write a program exactly like the one above. The Create Subroutine icon is used to create the subroutine. The subroutine will not run until the Run Subroutine icon appears.
 * 2) Program the RCX to run this subroutine two times. You need to place the Run Subroutine icon at two different places in the program. You can add to or change the program.
 * 3) Make a subroutine that does not use music.

Extra Challenge
You will need an RCX car with two motors, a light sensor, and a touch sensor. Write a program with two subroutines. Program your car to do one subroutine based on light sensor input and another subroutine based on the touch sensor input. You will need to use a different modifier for each Run Subroutine command.

return to Lego Home Page