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/problems/introduction/circle20/en.py | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'robot/problems/introduction/circle20/en.py') diff --git a/robot/problems/introduction/circle20/en.py b/robot/problems/introduction/circle20/en.py index 8210d71..c677cce 100644 --- a/robot/problems/introduction/circle20/en.py +++ b/robot/problems/introduction/circle20/en.py @@ -7,8 +7,26 @@ name = 'Circle 20 cm' slug = 'Circle 20 cm' description = '''\ -''' +

Write a program that will make the robot drive in circle (r=20cm) and stop after one loop.

''' hint = { - + 'mW_init':mod.hint['init'], + 'connectMotorLeft':mod.hint['connectMotorLeft'], + 'connectMotorRight':mod.hint['connectMotorRight'], + 'moveSteering':mod.hint['moveSteering'], + 'onForSeconds':mod.hint['onForSeconds'], + 'direction':mod.hint['direction']+['''

The value of this parameter should be such that would make the robot circle with radius 20cm. This value highly depends on the construction of the robot.

''', + '''

robot.move_steering( 'on_for_seconds', direction=20, ... ).

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

Experimentally determine the time (in seconds) the robot needs for one loop.

''', + '''

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

'''], } + +plan = ['''\ +

The program should:

+
    +
  1. create a mindstorms_widgets() object, which represents the robot in your code.
  2. +
  3. connect the driving motors.
  4. +
  5. calculate the turn so that the robot would drive in circle with radius 20 cm.
  6. +
  7. synchronize the motors and run them for a specified time, so that the robot stops after one round.
  8. +
''' +] -- cgit v1.2.1