From f80206e6a4e4cec1574a375cb04dbdf07d3e02cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=BDabkar?= Date: Wed, 23 Dec 2015 11:28:05 +0100 Subject: angleska verzija --- robot/en.py | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) (limited to 'robot/en.py') diff --git a/robot/en.py b/robot/en.py index f296516..61314e9 100644 --- a/robot/en.py +++ b/robot/en.py @@ -3,5 +3,47 @@ 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.

+'''], } -- cgit v1.2.1