Aufgabe 07: Hologramm

pull/5/head
(MakerLab) Laptop 2 2023-11-08 18:51:37 +01:00
parent c8d2452a11
commit eff2b56555
1 changed files with 9 additions and 6 deletions

15
main.py
View File

@ -74,14 +74,17 @@ dh auch an die Funktionen im importierten Code übergeben werde
hub = PrimeHub()
# Initialisiere Robot Klasse mit unseren Funktionen
iqRobot: iq.IQRobot = iq.IQRobot(hub, typ=iq.BRICKIES_BOT)
iqRobot: iq.IQRobot = iq.IQRobot(hub, typ=iq.BRICKIES_BOT_2)
# Führe Funktionen aus unser Robot Klasse aus:
iqRobot.show('HAPPY')
iqRobot.fahre_mit_drehung(strecke1=10, grad=90, strecke2=10)
iqRobot.fahre_mit_drehung(strecke1=0, grad=-90, strecke2=10)
def hologram_aufgabe1():
iqRobot.fahre_gerade_aus(cm=75,speed=80)
iqRobot.drehe(45, False)
iqRobot.fahre_gerade_aus(cm=14,speed=70)
iqRobot.fahre_gerade_aus(cm=-13,speed=50)
iqRobot.drehe(-45, False)
iqRobot.fahre_gerade_aus(cm=-75,speed=50)
hologram_aufgabe1()