Download RoboLab Reference Guide - Utah State 4-H

Transcript
24
Use this icon when you want the direction of
the motor to be randomly selected. This does
NOT turn the motor on. It needs to be used in
combination with a command that starts the
motor or at a point in your program where the
motor is already on.
Random
Direction
Example
This piece of code turns motor A on in the forward
direction and then randomly selects a direction for the
motor (forward or backward), the motor runs for 10 seconds
and is then stopped.
Turn
Outputs
On
Use this command to turn on motors and lamps with
their last power and direction settings.
Example
This piece of code assigns the speed of motor B to 3, and
the direction of motor B to forward, and then turns it on.
After 2 seconds it turns motor B off.
LEGO, the LEGO logo and MINDSTORMS are trademarks of the LEGO Group.
© 2006 The LEGO Group.
This page may be photocopied for non-commercial educational use.
All other rights reserved.
Visit www.MINDSTORMSeducation.com & www.LEGOengineering.com