Fixed and refactored
This commit is contained in:
parent
127137e79f
commit
833224793a
2 changed files with 43 additions and 18 deletions
7
main.py
7
main.py
|
@ -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')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue