summaryrefslogtreecommitdiff
path: root/robot/problems/introduction/rotateback
diff options
context:
space:
mode:
Diffstat (limited to 'robot/problems/introduction/rotateback')
-rw-r--r--robot/problems/introduction/rotateback/common.py3
-rw-r--r--robot/problems/introduction/rotateback/naloga11_rotateBack.py3
-rw-r--r--robot/problems/introduction/rotateback/sl.py12
3 files changed, 13 insertions, 5 deletions
diff --git a/robot/problems/introduction/rotateback/common.py b/robot/problems/introduction/rotateback/common.py
index 10cca87..7c8ce44 100644
--- a/robot/problems/introduction/rotateback/common.py
+++ b/robot/problems/introduction/rotateback/common.py
@@ -10,9 +10,6 @@ number = 11
visible = True
solution = '''\
-from ev3dev import *
-from mindstorms_widgets import mindstorms_widgets
-
def sgn(x):
return -1 if x<0 else (1 if x>0 else 0)
diff --git a/robot/problems/introduction/rotateback/naloga11_rotateBack.py b/robot/problems/introduction/rotateback/naloga11_rotateBack.py
index 0bab735..2677f05 100644
--- a/robot/problems/introduction/rotateback/naloga11_rotateBack.py
+++ b/robot/problems/introduction/rotateback/naloga11_rotateBack.py
@@ -2,12 +2,11 @@
# coding=utf-8
print ("""
-Naloga 11:
+Naloga 11: Robot naj drži smer - če ga obrnemo iz začetne smeri, naj se zasuka nazaj v prvotno smer. Ob pritisku na stikalo, naj se resetira (smer nastavi na 0).
""")
import sys
sys.path.append('/home/user/codeq')
import time
-from ev3dev import *
from mindstorms_widgets import mindstorms_widgets
def sgn(x):
diff --git a/robot/problems/introduction/rotateback/sl.py b/robot/problems/introduction/rotateback/sl.py
index 269ea34..3242a80 100644
--- a/robot/problems/introduction/rotateback/sl.py
+++ b/robot/problems/introduction/rotateback/sl.py
@@ -31,3 +31,15 @@ hint = {
'while':['''<p>Program naj teče v neskončni zanki.</p>''',
'''<p><code>while 1:</code></p>'''],
}
+
+plan = ['''\
+<p>Program izvedemo v naslednjih korakih:</p>
+<ol>
+ <li>Naredimo objekt mindstorms_widgets(), s katerim predstavimo robota.</li>
+ <li>Nanj povežemo oba pogonska motorja.</li>
+ <li>Robotu dodamo žiroskop in ga resetiramo.</li>
+ <li>Robotu dodamo stikalo.</li>
+ <li>V neskončni zanki beremo vrednost kota z žiroskopom.</li>
+ <li>Glede na zasuk iz začetne lege, robota na mestu obrnemo v začetno smer.</li>
+</ol>'''
+]