From 88852015e0ab210d14f72e6d2da4555ba64a9998 Mon Sep 17 00:00:00 2001 From: jenoack Date: Wed, 15 Feb 2023 09:07:56 +0100 Subject: [PATCH] modified method name --- iqrobot.py | 2 +- main.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/iqrobot.py b/iqrobot.py index 2ca5df9..1595e5b 100644 --- a/iqrobot.py +++ b/iqrobot.py @@ -27,7 +27,7 @@ class IQRobot: self.hub.light_matrix.show_image(image) - def driveForward(self, seconds: float): + def driveForward_for_sec(self, seconds: float): # Fahre die übergebene Anzahl seconds gerade aus self.movementMotors.start() wait_for_seconds(seconds) diff --git a/main.py b/main.py index 9fa64d0..c6ba5c2 100644 --- a/main.py +++ b/main.py @@ -83,7 +83,7 @@ iqRobot: iq.IQRobot = iq.IQRobot(hub, LEFT_MOTOR_PORT, RIGHT_MOTOR_PORT, COLOR_S # Führe Funktionen aus unser Robot Klasse aus: iqRobot.show('HAPPY') -iqRobot.driveForward(2.0) +iqRobot.driveForward_for_sec(2.0) colorIntensity = iqRobot.getColorIntensity() print("Farbintensität: " + str(colorIntensity)) -- 2.45.2