mirror of
https://github.com/kevinveenbirkenbach/erinaco.git
synced 2024-11-23 14:31:04 +01:00
Skalierenfunktion hinzugefuegt
This commit is contained in:
parent
6f4364665b
commit
f817e73fa9
22
skalieren.py
Normal file
22
skalieren.py
Normal file
@ -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));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user