Compare commits
No commits in common. "060a72c2a7d3dd934efa400139283176b8f26834" and "d82f252f7fb308701702e8fcb2236a9984991941" have entirely different histories.
060a72c2a7
...
d82f252f7f
1 changed files with 1 additions and 13 deletions
14
iqrobot.py
14
iqrobot.py
|
@ -2,7 +2,7 @@
|
|||
|
||||
import math
|
||||
|
||||
from spike import PrimeHub, Motor, MotorPair, ColorSensor, MotionSensor, DistanceSensor
|
||||
from spike import PrimeHub, Motor, MotorPair, ColorSensor, MotionSensor
|
||||
from spike.control import wait_for_seconds
|
||||
|
||||
HELLO = "HELLO IQ"
|
||||
|
@ -40,8 +40,6 @@ class IQRobot:
|
|||
|
||||
self.bewegungsSensor: MotionSensor = MotionSensor()
|
||||
|
||||
self.abstandsSensor: DistanceSensor = DistanceSensor("D")
|
||||
|
||||
|
||||
def show(self, image: str):
|
||||
'''
|
||||
|
@ -152,15 +150,6 @@ class IQRobot:
|
|||
self.bothFrontMotors.move(rotations, unit='rotations',speed=20)
|
||||
|
||||
|
||||
def fahre_bis_abstand(self, abstand: int, speed=30, geregelt=True):
|
||||
self.antrieb.start_at_power(speed)
|
||||
abstand_gerade = self.abstandsSensor.get_distance_cm()
|
||||
while abstand_gerade > abstand:
|
||||
abstand_gerade = self.abstandsSensor.get_distance_cm()
|
||||
print(str(abstand_gerade))
|
||||
self.antrieb.stop()
|
||||
|
||||
|
||||
print("successfully loaded the IQ Lego teams code :)")
|
||||
|
||||
|
||||
|
@ -170,4 +159,3 @@ print("successfully loaded the IQ Lego teams code :)")
|
|||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue