summaryrefslogtreecommitdiff
path: root/robot/en.py
diff options
context:
space:
mode:
Diffstat (limited to 'robot/en.py')
-rw-r--r--robot/en.py42
1 files changed, 42 insertions, 0 deletions
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':['''<p>In code the robot is represented by mindstorms_widgets(): <code>robot = mindstorms_widgets()</code>.</p>'''],
+ 'connectMotorLeft':['''<p>Connect the left motor to the robot.</p>''',
+ '''<p><code>robot.connect_motor( 'left' )</code>.</p>'''],
+ 'connectMotorRight':['''<p>Connect the right motor to the robot.</p>''',
+ '''<p><code>robot.connect_motor( 'right' )</code>.</p>'''],
+ 'moveSteering':['''<p>Synchronize the motors.</p>''',
+ '''<p>Use move_steering method for synchonization <code>robot.move_steering( ... )</code>.</p>'''],
+ 'moveSteeringOff':['''<p>Stop the motors.</p>''',
+ '''<p><code>robot.move_steering( 'off' )</code>.</p>'''],
+ 'onForSeconds':['''<p>The first argument of <code>robot.move_steering</code> should specify that the motors will run for a certain amount of time.</p>''',
+ '''<p><code>robot.move_steering('on_for_seconds', ... )</code>.</p>'''],
+ 'direction':['''<p>Define the direction of moving; negative/positive values represent a left/right turn.</p>'''],
+ 'seconds':['''<p>Determine the running time of the motors.</p>'''],
+ 'connectColorSensor':['''<p>Connect the color sensor to the robot.</p>''',
+ '''<p><code>robot.connect_sensor( 'color' )</code>.</p>'''],
+ 'colorSensorMeasure':['''<p>While the robot is moving forward, it should use the color sensor in 'color' mode to recognize the colors.</p>''',
+ '''<p><code>robot.color_sensor_measure( 'color' )</code>.</p>'''],
+ 'colorSensorMeasureRLI':['''<p>Use the color sensor in 'reflected_light_intensity' mode.</p>''',
+ '''<p><code>robot.color_sensor_measure( 'reflected_light_intensity' )</code>.</p>'''],
+ 'moveTankOn':['''<p>Use the method for separate motor control, to set each motor's power separately.</p>''',
+ '''<p>The most appropriate for this is <code>robot.move_tank( ... )</code>.</p>''',
+ '''<p><code>robot.move_tank( 'on', ...)</code></p>'''],
+ 'lrPower': ['''<p>Set the powers of the left and right motor.</p>''',
+ '''<p><code>robot.move_tank( 'on', lr_power=[ ... ])</code></p>'''],
+ 'moveTankOff': ['''Stop the robot.''',
+ '''<p><code>robot.move_tank( 'off' )</code></p>'''],
+ 'onForRotations':['''<p>Set the first argument of <code>robot.move_steering</code> method so that the motors will run for the specified number of rotations.</p>''',
+ '''<p><code>robot.move_steering('on_for_rotations', ... )</code>.</p>'''],
+ 'rotations':['''<p>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.</p>''',
+ '''<p><code>robot.move_steering( 'on_for_rotations', direction=0, rotations=5 )</code>.</p>'''],
+ 'no_hint': ['''\
+<p>No hint here!</p>
+'''],
+
+ 'system_error': ['''\
+<p><span style="color: red;">System error:</span> [%=message%].</p>
+'''],
+
+ 'test_results': ['''\
+<p>Your program passed [%=passed%] / [%=total%] tests.</p>
+'''],
}