Fixed and refactored

This commit is contained in:
Lars Haferkamp 2023-10-05 08:56:46 +02:00
parent 127137e79f
commit 833224793a
2 changed files with 43 additions and 18 deletions

View file

@ -70,16 +70,11 @@ und auch `hub` als Instanz von PrimeHub
dh auch an die Funktionen im importierten Code übergeben werde
'''
# Definiere an welchen Ports die Sensoren angeschlossen sind
COLOR_SENSOR_PORT = 'E'
LEFT_MOTOR_PORT = 'A'
RIGHT_MOTOR_PORT = 'B'
# Initialisieren des Hubs, der Aktoren und Sensoren
hub = PrimeHub()
# Initialisiere Robot Klasse mit unseren Funktionen
iqRobot: iq.IQRobot = iq.IQRobot(hub, LEFT_MOTOR_PORT, RIGHT_MOTOR_PORT, COLOR_SENSOR_PORT)
iqRobot: iq.IQRobot = iq.IQRobot(hub, typ=iq.BRICKIES_BOT)
# Führe Funktionen aus unser Robot Klasse aus:
iqRobot.show('HAPPY')