From 1e5d42ba53ea0c631dbc6f21887839c91571ebca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=BDabkar?= Date: Tue, 13 Oct 2015 12:24:41 +0200 Subject: Uvodne vaje za robotiko --- robot/problems/introduction/circle20/naloga05_circle20.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 robot/problems/introduction/circle20/naloga05_circle20.py (limited to 'robot/problems/introduction/circle20/naloga05_circle20.py') diff --git a/robot/problems/introduction/circle20/naloga05_circle20.py b/robot/problems/introduction/circle20/naloga05_circle20.py new file mode 100644 index 0000000..e95d4f4 --- /dev/null +++ b/robot/problems/introduction/circle20/naloga05_circle20.py @@ -0,0 +1,13 @@ +#!/usr/bin/python + +import time +from ev3dev import * +from mindstorms_widgets import mindstorms_widgets + +robot = mindstorms_widgets() +robot.connect_motor( 'left' ) +robot.connect_motor( 'right' ) + +fct = 9 # full circle time +rad = 20 # Direction to make a good radius for the circle +robot.move_steering( 'on_for_seconds', direction=rad, power=40, seconds=fct ) \ No newline at end of file -- cgit v1.2.1