From f817e73fa9814571a47d4a8e4c54c4cf011cbc5b Mon Sep 17 00:00:00 2001 From: Kevin Frantz Date: Mon, 17 Apr 2017 18:00:09 +0000 Subject: [PATCH] Skalierenfunktion hinzugefuegt --- skalieren.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 skalieren.py diff --git a/skalieren.py b/skalieren.py new file mode 100644 index 0000000..85b726a --- /dev/null +++ b/skalieren.py @@ -0,0 +1,22 @@ +from core import Core as CORE +import getch +import time +core=CORE() +core.setSensorValues() +core.printValues() +print("Zum fortfahren beliebige Taste druecken..."); +getch.getch(); +core.turnRight(); +startTime=time.time(); +whileStatus=0 +while True: + if core.infarotMitteRechts.getValue(): + if whileStatus==1: + runTime=time.time()-startTime; + core.stop(); + break; + else: + whileStatus=1; +print("Die ausfuehrzeit betraegt {0} Sekunden.".format(runTime)); + +