name = 'Robot' description = 'Introductory Robot course.' hint = { 'init':['''

In code the robot is represented by mindstorms_widgets(): robot = mindstorms_widgets().

'''], 'connectMotorLeft':['''

Connect the left motor to the robot.

''', '''

robot.connect_motor( 'left' ).

'''], 'connectMotorRight':['''

Connect the right motor to the robot.

''', '''

robot.connect_motor( 'right' ).

'''], 'moveSteering':['''

Synchronize the motors.

''', '''

Use move_steering method for synchonization robot.move_steering( ... ).

'''], 'moveSteeringOff':['''

Stop the motors.

''', '''

robot.move_steering( 'off' ).

'''], 'onForSeconds':['''

The first argument of robot.move_steering should specify that the motors will run for a certain amount of time.

''', '''

robot.move_steering('on_for_seconds', ... ).

'''], 'direction':['''

Define the direction of moving; negative/positive values represent a left/right turn.

'''], 'seconds':['''

Determine the running time of the motors.

'''], 'connectColorSensor':['''

Connect the color sensor to the robot.

''', '''

robot.connect_sensor( 'color' ).

'''], 'colorSensorMeasure':['''

While the robot is moving forward, it should use the color sensor in 'color' mode to recognize the colors.

''', '''

robot.color_sensor_measure( 'color' ).

'''], 'colorSensorMeasureRLI':['''

Use the color sensor in 'reflected_light_intensity' mode.

''', '''

robot.color_sensor_measure( 'reflected_light_intensity' ).

'''], 'moveTankOn':['''

Use the method for separate motor control, to set each motor's power separately.

''', '''

The most appropriate for this is robot.move_tank( ... ).

''', '''

robot.move_tank( 'on', ...)

'''], 'lrPower': ['''

Set the powers of the left and right motor.

''', '''

robot.move_tank( 'on', lr_power=[ ... ])

'''], 'moveTankOff': ['''Stop the robot.''', '''

robot.move_tank( 'off' )

'''], 'onForRotations':['''

Set the first argument of robot.move_steering method so that the motors will run for the specified number of rotations.

''', '''

robot.move_steering('on_for_rotations', ... ).

'''], 'rotations':['''

Determine the number of rotations; how many turns should the motors do in a meter? Measure the circumference of the wheel and compute the number of rotations per meter.

''', '''

robot.move_steering( 'on_for_rotations', direction=0, rotations=5 ).

'''], 'no_hint': ['''\

No hint here!

'''], 'system_error': ['''\

System error: [%=message%].

'''], 'test_results': ['''\

Your program passed [%=passed%] / [%=total%] tests.

'''], }