name = 'Robot' description = 'Introductory Robot course.' hint = { 'init':['''
In code the robot is represented by mindstorms_widgets(): robot = mindstorms_widgets()
.
Connect the left motor to the robot.
''', '''robot.connect_motor( 'left' )
.
Connect the right motor to the robot.
''', '''robot.connect_motor( 'right' )
.
Synchronize the motors.
''', '''Use move_steering method for synchonization robot.move_steering( ... )
.
Stop the motors.
''', '''robot.move_steering( 'off' )
.
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', ... )
.
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' )
.
While the robot is moving forward, it should use the color sensor in 'color' mode to recognize the colors.
''', '''robot.color_sensor_measure( 'color' )
.
Use the color sensor in 'reflected_light_intensity' mode.
''', '''robot.color_sensor_measure( 'reflected_light_intensity' )
.
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', ...)
Set the powers of the left and right motor.
''', '''robot.move_tank( 'on', lr_power=[ ... ])
robot.move_tank( 'off' )
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', ... )
.
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 here!
'''], 'system_error': ['''\System error: [%=message%].
'''], 'test_results': ['''\Your program passed [%=passed%] / [%=total%] tests.
'''], }