diff options
author | Timotej Lazar <timotej.lazar@fri.uni-lj.si> | 2015-10-13 13:00:05 +0200 |
---|---|---|
committer | Timotej Lazar <timotej.lazar@fri.uni-lj.si> | 2015-10-13 13:00:05 +0200 |
commit | a86a6ca92d315dedf3ce4d5035a4c38178f8b531 (patch) | |
tree | 96ae9beb094aa8bfa74d69a0878349107e900b04 /robot/problems/introduction/wall1m/naloga06_wall1m.py~ | |
parent | 1e5d42ba53ea0c631dbc6f21887839c91571ebca (diff) |
Remove backup files and add *~ to .gitignore
Diffstat (limited to 'robot/problems/introduction/wall1m/naloga06_wall1m.py~')
-rw-r--r-- | robot/problems/introduction/wall1m/naloga06_wall1m.py~ | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/robot/problems/introduction/wall1m/naloga06_wall1m.py~ b/robot/problems/introduction/wall1m/naloga06_wall1m.py~ deleted file mode 100644 index f7e6bad..0000000 --- a/robot/problems/introduction/wall1m/naloga06_wall1m.py~ +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/python -# coding=utf-8 - -print """ -Naloga 6: - Robota postavi pred zid, tako da bo od njega oddaljen vsaj 1 m; vmes naj ne bo ovir. - Napisi program, s katerim bo robot vozil naravnost proti zidu z 80% mocjo. - Na razdalji 50 cm od zida naj robot zmanjsa hitrost na 20%, na razdalji 20 cm od zida pa naj se ustavi. -""" - -import time -from ev3dev import * -from mindstorms_widgets import mindstorms_widgets - -us = ultrasonic_sensor(); assert us.connected -us.mode = 'US-DIST-CM' # Continuous measurement of distance (0-2550 mm) - -# for m in us.modes: -# print "\t",m -#exit() -robot = mindstorms_widgets() -robot.connect_motor( 'left' ) -robot.connect_motor( 'right' ) - -robot.move_steering( 'on', power=80 ) -while us.value()>500: - pass -robot.move_steering( 'on', power=20 ) -while us.value()>200: - pass -robot.move_steering( 'off' ) |