From b4e46b75f5e2a890b41d2e20a89767590e54ccb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=BDabkar?= Date: Tue, 15 Dec 2015 10:34:40 +0100 Subject: Dodani plani za robotske probleme. --- robot/problems/introduction/followline/common.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'robot/problems/introduction/followline/common.py') diff --git a/robot/problems/introduction/followline/common.py b/robot/problems/introduction/followline/common.py index 3e84cd4..46df5c6 100644 --- a/robot/problems/introduction/followline/common.py +++ b/robot/problems/introduction/followline/common.py @@ -11,8 +11,6 @@ visible = True solution = '''\ import time -from ev3dev import * -from mindstorms_widgets import mindstorms_widgets robot = mindstorms_widgets() robot.connect_motor( 'left' ) @@ -21,10 +19,10 @@ robot.connect_sensor( 'color' ) start = time.time() while time.time()-start < 10: - if robot.color_sensor_measure('reflected_light_intensity') < 30: - L, R = 0, 20 + if robot.color_sensor_measure('reflected_light_intensity') < 50: + L, R = 0, 30 else: - L, R = 20, 0 + L, R = 30, 0 robot.move_tank( 'on', lr_power=[L,R]) robot.move_tank( 'off' ) ''' -- cgit v1.2.1