LEGO Education Baby Toy computer control and robotics User manual

Category
Water pumps
Type
User manual
Quick Start Guide to computer control and robotics
using LEGO
®
MINDSTORMS™ for Schools
www.LEGO.com/education/MINDSTORMS
LEGO, the LEGO logo and MINDSTORMS are trademarks of the LEGO Group. ©2004 The LEGO Group.
1
This guide is intended for all fi rst time users of LEGO® MINDSTORMS™ for Schools and the ROBOLAB software (versions
2.0 or higher). It is a brief guide that will help you to install the software and try out some of the basic programming prin-
ciples. It is intended as a brief introduction. You will need the ROBLAB User Guide to become fully conversant with the
concept. The guide is based on functions within ROBOLAB 2.0.
We recommend that you carry out this program in two steps—the Pilot Course followed by the Inventor Course. Have fun!
You will need either a RoboTechnology Set or Team Challenge Set to complete this course.
Contents
Installing ROBOLAB software and preparing the RCX brick and IR Tower Page 4
Installing Firmware Page 5
PILOT Course (Estimated time needed 1–2 hours)
Pilot levels 1–4
Pilot Level 1 Page 6
Turning a motor on or off
Test Your Skills—Stop the motor on time
Pilot Level 2 Page 8
Introducing lamp, touch sensor and setting power levels
Test Your Skills—Vary power levels and change directions
Pilot Level 3 Page 9
Programming with two steps, introducing light sensor and loops
Test Your Skills—Program a car to respond to light readings
Pilot Level 4 Page 11
Programming with multiple steps
Test Your Skills—Program a car to drive in a rectangle
INVENTOR Course (Estimated time needed 2–3 hours)
Inventor levels 1–4
Inventor Level 1 Page 13
Get to know the basic icons and how to string them together
Program a car to change direction on time
Inventor Level 2 Page 15
Introducing modifi ers, fl ip direction, jump & land and random time functions
Program a car to repeat a program, fl ip direction
of the motor, follow timing and play a sound
Inventor Level 3 Page 18
Introducing music, task split, loop and fork merge options
Program two strings, one driving the motor, the
other playing music. Program a repeated sequence.
Inventor Level 4 Page 20
Introducing container commands
Program two strings using container commands to
repeat a sequence
Ideas for practising your skills
Investigator
A general introduction Page 23
Building Instructions Page 25
2
LEGO® MINDSTORMS™ for Schools uses the ROBOLAB software to write programs. The ROBOLAB software runs on both
PCs and MACs. LEGO MINDSTORMS for Schools includes an RCX—a programmable LEGO brick. The RCX is a microcom-
puter with three output ports A, B and C for connecting motors and lamps, and three input ports 1, 2 and 3 for connecting
sensors. ROBOLAB programs are downloaded to the RCX via an Infrared (IR) Tower. The IR Tower is available with a serial
connection (COM port) or a USB connection (for 2.5 or higher versions only).
Temperature
sensor
Motor
Light sensor
Touch sensor
Lamp
IR window
Three input
ports for
connecting
sensors
Plug for
transformer
adapter
Three output
ports for
connecting
motors and
lamps
3
Serial (COM port) Infrared Tower,
requires a 9 volt battery
USB Infrared Tower
1. Insert the ROBOLAB CD-ROM in your CD drive and start the program. Follow the installation instructions. The installation
will take up to 20 minutes. DO NOT connect the IR Tower until told to.
2. While waiting for the installation to fi nish you should insert 6 AA batteries in your RCX. Remove the grey cover and place
them according to indicators at the bottom of the RCX. You can also use rechargeable batteries or a 9–12 volt LEGO trans-
former (product number 9833).
3. When the software has been installed successfully, you should un-tick the box ‘Launch ROBOLAB’, so that you do NOT
start ROBOLAB yet.
4. Now you must connect your IR Tower to your computer. Make sure ROBOLAB is shutdown before connecting the USB IR
Tower. ROBOLAB will NOT detect the USB IR Tower if you connect it while ROBOLAB is running. If you have a USB IR Tower
simply connect it to a USB port.
5. If you have a serial IR Tower you must fi rst insert a 9-volt battery before connecting it to a serial port (COM port).
NOTE: Infrared communication between the IR Tower and the RCX reaches up to 10 meters. However, communication can
be interrupted if there are several RCX bricks within reach of one IR Tower. Therefore the IR Tower should always be set to
short range when working with more than one RCX in a classroom.
For the USB Tower adjust the setting in the Windows Control Panel. Click the Start icon on your desktop, open Control
Panel, select the LEGO USB Tower icon and set the Infrared Range to short.
Installing ROBOLAB software and preparing the RCX brick
and IR Tower
To select the short range on the serial IR Tower move the switch to the left at the front
bottom of the .
4
Firmware is the software you need to download to the RCX before using ROBOLAB to write programs. You can always
check if the fi rmware is installed on your RCX by turning it on. If the display shows 00.00 fi rmware is installed. If the fi rst
four digits are missing there is no fi rmware.
To install fi rmware:
1. Start ROBOLAB. Select Start at the rear left hand corner of your screen. Scroll up to programs and select ROBOLAB.
2. Select Administrator.
3. Turn on the RCX by pressing the red On-Off button.
4. Place the RCX in front of the IR Tower (the IR window of the RCX must face the IR Tower)
5. Select download fi rmware. It takes about 4 minutes.
6. Select the ‘Back’ button when the fi rmware has been successfully installed.
7. Your RCX is now ready for programming in ROBOLAB.
NOTE: If you remove the batteries from the RCX the fi rmware will be lost and you will have to download it again. To keep
the fi rmware when changing batteries you must fi rst turn off the RCX, then change the batteries within approximately one
minute. If you change the batteries one at a time you will have one minute for each battery.
Trouble Shooting—Firmware
If the fi rmware has suddenly been lost it may be lost on the RCX because two or more RCX bricks were in reach of the
same IR Tower when the program was downloading. Turn off the RCX bricks that you are not downloading to, or keep them
out of reach of the IR Tower. Make it a standard procedure to turn off an RCX that you are not using. This also saves bat-
tery life—even though the RCX turns off automatically after 15 minutes.
Trouble Shooting—Infrared Communication
Strong light may interrupt the infrared communication. Cover the IR Tower and the RCX brick
High temperature may cause interruption. Computer labs are often very warm, place the IR Tower on the fl oor.
Mirrors and refl ecting surfaces may cause interruption, point the IR Tower in another direction, but still facing the RCX IR
window.
Serial IR Tower is not working. Check that the battery is in place.
If download is still failing you can place the IR Tower and RCX under the green plastic storage box or a cardboard box.
This should effi ciently eliminate interruptions.
If the computer doesn’t detect the IR Tower you can use an automatic detection function. Access via the front page of
ROBOLAB. Select Administrator, select Select COM Port then choose Auto Detect.
Installing Firmware
RCX with fi rmware
installed
5
Display showing
no fi rmware
installed
Pilot Level 1
Turning a motor on or off
1. Connect a motor to port A on your RCX and turn the RCX on by pressing the red
On-Off button. If you connect a wheel to the motor you will be able to see which
direction the motor is programmed to run.
2. Start ROBOLAB, select Programmer and double-click on Pilot 1. A default program
will appear on your screen. The motor icon offers you a left (clockwise) or right (counter
clockwise) option.
3. Place your RCX in front of the IR Tower. Make sure the
RCX is turned on. NOTE that the RCX automatically turns
off after 15 minutes.
4. Select the white arrow button, which is the download
button. A new box appears on your screen indicating that
download is proceeding.
5. Press the green Run button on your RCX.
a. Is the motor running? If not—have you connected the
wire to port A?
b. Is the wheel turning counter clockwise? If not—turn the
wire connector on port A 180 degrees and press the green
Run button again.
6. Now modify the program so that the wheel turns counter
clockwise for four seconds.
a. Select the motor icon on the screen and change direction.
b. Then select the time icon to change the time setting.
7. Download your new program by selecting the white down-
load arrow and press the green Run button on the RCX.
PILOT Course Levels 1–4
(Estimated time needed 1–2 hours)
6
Test Your Skills—Stop the motor on time
1. Build a car driven by one motor. See building instructions on page 25.
Follow steps 1 to 4.
2. Program the car to move forward for one second
3. Place a measuring tape on the fl oor and test how far the car travels in
one second. Repeat the test three times to calculate an average distance.
4. Place a LEGO fi gure or other object on the fl oor next to the measuring
tape at a distance equivalent to that covered in one second.
5. See if the car travels the correct distance without knocking the
gure over.
6. Repeat points 3,4 and 5 changing the time to 2, 4 and 6 seconds and
calculate the distance to be covered each time.
NOTE: This is a good classroom activity to try with several groups of children, each performing the same task and compar-
ing results. Let each group make a graph with time and distance and plot in their results.
7
Pilot Level 2
Introducing lamp, touch sensor, and setting power levels
At this level you can work with output ports A and C, set the power level
and use a touch sensor.
1. See building instructions. Follow step 4a on page 28—attaching a lamp
and touch sensor.
2. If you are still in Pilot level 1 select Back and then select Pilot level 2.
3. The motor icon must be set to run clockwise (pointing right) at full
speed (5)
4. The lamp should be set to the lowest power level (1)
5. The touch sensor must be set to port 2. Select the icon indicating that
the sensor is pressed in. (See program illustrated below)
6. For this activity you will hold the touch sensor in your hand and press
when you want the vehicle to stop.
7. Download and run the program
Test Your Skills—Vary power levels and change directions
Try making your own combinations by varying power levels for the lamp and selecting different directions for the motor.
Try the other touch sensor icon, which reacts when the touch sensor is released. This works, for example, when a vehicle
drives over a raised surface where the touch sensor is pushed in—then reaches a lowered surface where the touch sensor
is automatically released.
Lamp
Touch sensor
Touch sensor icons
8
Pilot Level 3
Programming with two steps, introducing light sensor and loops
At this level you can work with all three outputs and use the light sensor. Furthermore you now have two programming
steps. You will need to use the red stop sign to block a port that is not in use.
1. See building instructions. Follow instructions for 4b on page 29—attaching a light sensor and a lamp.
2. Select Pilot level 3.
3. Program the following:
4. Download the program to the RCX.
5. Press the black view button on the RCX. Continue pressing until the arrow in the display points to port 1.
6. Hold the car in your hand. Point the sensor at a light surface (at a distance of about 5mm) and press Run. Then move
around the room holding the sensor up to different surfaces. As soon as the light sensor records a darker surface (5% less
light than previously) the motor will change direction. Since you have programmed it with a loop, it will do that continuously
until you press the green button again.
Trouble Shooting – Light Sensor
If there is no signal (red light) on the light sensor when you connect it to the RCX
this means that ports 1, 2 and 3 on the RCX do NOT automatically recognise the
sensors. You must write a program where the light sensor is set to port 1. Download
this to the RCX and run the program. Now port 1 knows that it is connected to a light
sensor. You can turn the RCX off and on again and the light sensor will still work.
Light sensor
Port 1
9
Test Your Skills—Program a car to respond to light readings
1. Write a program in Pilot level 3 that makes the car move forward until the light sensor meets a darker refl ection (such as
the edge of the table). Then tell the car to move backward until you stop it by pressing a touch sensor. We recommend
that you program the car to move slowly. Set the motor power level to 2 or 3.
2. You could also program the lamp to be on when moving forward and off when moving backwards.
3. To repeat this program you need to activate loop mode. Select the pink arrow and select the loop icon.
See illustration below.
10
Pilot Level 4
Programming with multiple steps
At this level you can add extra steps to the process to make the program more complex.
When you open Pilot level 4 you will fi nd a sample program with two steps. To avoid confusion when making your fi rst
program you should delete step 2. Select the red arrow as shown below, then select ‘-’ and delete. To create extra steps
select the ‘+’ button. To scroll through the steps select the red arrows.
Test Your Skills—Program a car to drive in a rectangle
1. Use the LEGO model illustrated in the building instructions of your RoboTechnology Sets 9785/86 (pages 17–24) or Team
Challenge Sets 9793/94 (pages 4–21 and page 24). See the illustrated overview of elements provided in each kit.
2. Program your vehicle to drive in a rectangle. You will need to program seven steps. Step one, program both motors so
that the vehicle runs forward. Step two, turn 90 degrees. To make the model turn 90 degrees you will need to ask one mo-
tor to drive forward and the other to drive backward.
Step three, move forward. Step four, turn 90 degrees. Step fi ve, move forward. Step six, turn 90 degrees. Step seven, move
forward and stop. Download and run your program.
11
NOTE: After fi nishing Step 2 you should download and test the program to determine how long it takes for the model to
turn 90 degrees. Note that the speed will vary depending on the age of your batteries. Different surface types also affect
turning speeds; select a smooth surface for best performance. Here is a possible solution for steps 1 and 2.
Congratulations!
You have now completed the fi rst part of your Quick Start Guide to programming in LEGO MINDSTORMS for Schools.
For more ideas about how to use these skills in the classroom see the activity packs for the RoboTechnology or Team
Challenge Sets, or visit
www.LEGO.com/education/MINDSTORMS for information about additional sets.
12
You are now entering a new world of programming, where the principles learned at Pilot level are relevant, but where many
new features will be introduced. Programming at this level is far more challenging and complex. We hope that this intro-
duction will give you the confi dence to get started. Programming takes place by dragging icons from a number of function
panels and dropping them into the programming window. Each Inventor Level offers an increasing number of program-
ming options.
Inventor Level 1
Get to know the basic icons and how to string them together
Use the LEGO model illustrated in the building instructions of your RoboTechnology Sets 9785/86 (pages 17–24) or Team
Challenge Sets 9793/94 (pages 4–21 and page 24). See the illustrated overview of elements provided in each kit.
1. Start ROBOLAB, select Programmer. Double click Inventor level 1.
2. You will see a default program on the screen. Maximise the programming window.
INVENTOR Course Levels 1–4
(Estimated time needed 2–3 hours)
Programming Window
13
3. Click your mouse on the programming window – it will either show you a black arrow,
a white hand, a cable reel or a text editing function. You can change the function of the
mouse by pressing the Tab button on your keyboard.
NOTE: You can also access these functions by selecting ‘Window’ in the top menu and scrolling down to ‘Show Tools
Palette’.
4. Select the black arrow function and mark the icon after the green traffi c light. Click the left button on your mouse and
press delete on your keyboard.
5. Continue to select each icon and delete until you only have the green and red traffi c lights left. Note that you can also
delete several icons by dragging the mouse across a selection and then pressing delete. Click and drag your red lights
further to the right side of the screen.
6. You now have space to select your own string of icons and practice linking them together.
7. You can copy the suggested program below, or select your own. To link each icon press the Tab bar until your mouse
becomes a cable reel. Click on the right hand corner of one icon until it reads ‘end’ and then click on the left hand corner
of the icon you wish to connect it to until it reads ‘begin’ and then release. A pink connecting line should appear between
the icons. You have to continue linking in this way until the line of icons is joined up.
8. If your connecting lines are black and white, this indicates that they are not active. Go into Edit on the menu bar and
select ‘Remove broken wires’ or press Control ‘b’, which is a shortcut. Then try to connect again using the cable reel.
9. When all connecting lines are linked the white download arrow will become active and you can download the program
to the RCX.
10. Copy the string illustrated below and download it to your LEGO vehicle. Note that in Inventor level you need to insert
Stop icons in order for the program to stop the previous instruction.
Tools Palette
The program will turn motor A and C on in different directions,
wait for 4 seconds and then turn off all outputs before stopping.
Your vehicle will run in circles for 4 seconds.
14
Inventor Level 2
Introducing modifi ers, fl ip direction, jump & land and random time functions.
At the top menu select Tools or Project (depending on version) and scroll down to Change Inventor Level. Choose Inventor
level 2.
Your programming options now expand to include 3 new sub-menus called Wait For, Structures and Modifi ers. To return to
the main functions palette select the white vertical arrow in the sub-menu.
Select the Help menu and scroll down to Show Context Help to fi nd out what the icons do. You can also place the icons on
your screen, move the mouse over a chosen icon and the information will automatically appear.
Wait For, Structures and Modifi ers
15
Use your two motored vehicle as for Inventor level 1.
1. Delete all icons between the start and stop lights. Start by dragging the red traffi c light icon further to the right so that you
have enough space on the screen to build your program.
2. Copy the program string shown below. Note that the motor icon should not be predetermined to a specifi c port, and that
the fl ip direction icon is situated below the motor icons in the functions palette. You now need to use new programming
icons, which tell the program to jump and land. Jumping and Landing is a way to loop the program as seen in Pilot levels.
Looping means repeating the program continuously. It is a good idea to begin saving the programs that you create. See top
menu under File.
Motor not Flip Direction Jump and Land
predetermined
3. Download the program and run it. NOTE: Modifi ers also need stringing together. Motor modifi ers must be connected to
the rear left and power levels to the rear right.
The program turns motor A and C on at power level 3, waits for 2 seconds, then fl ips the direction of motor C, waits for 1 sec-
ond and jumps back to the red land arrow and repeats the program. Your car should repeatedly move forward for 2 seconds
and turn for 1 second.
Introducing Play Sound and Random Time functions
1. Use your two motored vehicle as for Inventor level 1 and the same program as above.
2. You will now make the vehicle “wait for” random time instead of 2 and 1 seconds. (See program under point 6 on page 17)
Random Time
3. Delete the two Wait For icons and insert the random time icon. Remove bad wires (illustrated as black and white as op-
posed to pink) using Ctrl b and insert new wires using the cable reel via the Tab button. (If you use ROBOLAB 2.5 right click
the icon and choose replace). The next icon you choose will be inserted and connected automatically.
16
4. Select the Jump icon and the red traffi c light icon by dragging the mouse across them. Move them to the right, now
there is space for the Play Sound icon. Insert it after deleting the wire between the Random Time and the Jump Icon.
(If you use ROBOLAB 2.5 right click the wire and select Insert)
5. Now insert 3 and 2 seconds as the maximum time (default is 5 seconds) using a numeric constant, which is located in
the Modifi ers palette. As soon as you have dragged the icon into the programming window you can write its value. Alterna-
tively you can use the Tab button to access the Write Icon and then write the value in the numeric constant.
6. Download the program illustrated here and try it out on the fl oor.
The program turns motor A and C on at power level 3 and waits for random time (between 0 and 3 seconds), then it fl ips the
direction of motor C and waits for random time (between 0 and 2 seconds) plays a sound and jumps back to the red land
arrow and repeats the program. Your car will move forward for 0–3 seconds, turn for 0–2 seconds and play a sound repeat-
edly. The sound is the same as that which the RCX makes when it has downloaded a program.
Write Icon
17
Inventor Level 3
Introducing music, task split, loop and fork merge options
At the top menu select Tools or Project (depending on version) and scroll down to Change Inventor Level. Select Inventor
level 3.
Again the Functions palette expands. One new sub-menu called Music is now available and the
Structures sub-menu is expanded with three new features; Fork Merge, Loop and Task Split. You can also
choose random power level for outputs in the Modifi ers sub-menu. The small black arrow at the top
right corner of the Music icon indicates that the menu expands further.
Remember you can use the Help menu. Scroll down to Show Context Help to fi nd out what the Fork Merge Icons do. You
can place the icons onto your screen and move the mouse over a chosen icon and the information will automatically ap-
pear.
Introducing the task split command
1. Use your two motored vehicle as for Inventor level 1.
2. Delete the program on the screen and copy the program string below. This program asks the RCX to do two different
tasks at the same time.
3. Download the program illustrated below and try it out on the fl oor.
Wait For, Structures (including Fork Merge), Modifi ers and Music
Music Icon Fork Merge Icons
18
At the upper string motors A and C turn clockwise, wait for two seconds, fl ip direction, wait for another two seconds and
then jump back to the yellow arrow and repeat the task. The lower string continues to play six notes. The program must be
stopped by pressing the Run button. The vehicle will drive forward and backward while playing a melody.
Introducing touch sensor fork and merge and a specifi ed number of loops
1. Use your two motored vehicle as in Inventor level 1. Attach a touch sensor, making sure it is correctly connected to Port 2
with a long wire.
2. Delete the program on the screen and copy the program string below. You will need the Touch Sensor Fork icon to tell
the vehicle how to distinguish between pressed and released.
Touch Sensor Fork
3. Download and run the program illustrated here. Try estimating how long the program will last.
The loop will be repeated 30 times. The Touch Sensor Fork determines the direction of the motor. If the yellow touch button
is released (upper fork) Motor A and C will turn clockwise (backwards arrow), then the program waits for 0,5 of a second
before playing a C-note and returns to the Touch Sensor Fork icon. The same will happen again until the touch sensor is
pressed in. The string below is now activated—motors A and C will be turned on counter clockwise (forward arrow), wait for
0,5 of a second; play an F-note and return to the Touch Sensor Fork. You can activate or release the touch sensor as often
as you wish, to observe how it changes direction After the upper or lower strings have been repeated 30 times the RCX will
play a sound indicating that the program is complete.
Loop Icon set at 30
19
Inventor Level 4
Introducing Containers
At the top menu select Tools or Project (depending on version) and scroll down to Change Inventor Level. Choose Inventor
level 4.
This level gives you access to all the ROBOLAB programming icons and lets you make very advanced and complex pro-
grams. You can explore the possibilities by using the Context Help menu or see the Using ROBOLAB guide, which you can
purchase along with the software.
Three new sub-menus called Reset, Containers, and RCX communications appear. (Please note that there are an addi-
tional 8 sub-menus in ROBOLAB 2.5.)
Container Icons
Introducing Container Commands
A Container is an icon that stores a value and tells the program when to send that value to another programming icon.
Within the Container the value can be multiplied, divided or subtracted.
1. Use your two motored vehicle. Make sure the lamp is connected to output port B. You will not be using the motor or
touch sensor.
2. Delete the program on your screen and copy the string below. For this challenge you will need the Container Fork icon
to tell the robot how to distinguish between the value stored in the container.
Wait For, Structures, Music, Modifi ers and Container Icons
Container Fork Icon
20
  • Page 1 1
  • Page 2 2
  • Page 3 3
  • Page 4 4
  • Page 5 5
  • Page 6 6
  • Page 7 7
  • Page 8 8
  • Page 9 9
  • Page 10 10
  • Page 11 11
  • Page 12 12
  • Page 13 13
  • Page 14 14
  • Page 15 15
  • Page 16 16
  • Page 17 17
  • Page 18 18
  • Page 19 19
  • Page 20 20
  • Page 21 21
  • Page 22 22
  • Page 23 23
  • Page 24 24
  • Page 25 25
  • Page 26 26
  • Page 27 27
  • Page 28 28
  • Page 29 29

LEGO Education Baby Toy computer control and robotics User manual

Category
Water pumps
Type
User manual

Ask a question and I''ll find the answer in the document

Finding information in a document is now easier with AI