# coding=utf-8 import server mod = server.problems.load_language('robot', 'en') id = 208 name = 'Forward 1m' slug = 'Forward 1m' description = '''\ Write a program that would make the robot drive forward and stop after 1 meter. ''' hint = { 'mW_init':mod.hint['init'], 'connectMotorLeft':mod.hint['connectMotorLeft'], 'connectMotorRight':mod.hint['connectMotorRight'], 'moveSteering':mod.hint['moveSteering'], 'onForRotations':mod.hint['onForRotations'], 'direction':mod.hint['direction']+['''

robot.move_steering( '...', direction=0, ... ).

'''], 'seconds':mod.hint['seconds']+['''

robot.move_steering( 'on_for_seconds', direction=0, seconds=3 ).

'''], 'rotations':mod.hint['rotations'], } plan = ['''\

Program izvedemo v naslednjih korakih:

  1. create a mindstorms_widgets() object, which represents the robot in your code.
  2. connect the driving motors.
  3. measure the circumference of robot's wheels and compute the number of rotations per meter.
  4. synchronize the motors and run them so that the robot would move forward for computed number of rotations.
''' ]