ropy/rp_cmd.py

52 lines
1.6 KiB
Python
Raw Permalink Normal View History

2022-10-05 18:52:03 +02:00
import time
2022-08-14 08:03:07 +02:00
from rp_lib import * # Bibliothèque Ropy
###############################################################################
2023-02-05 20:56:46 +01:00
# rp_cmd.py
2022-11-26 05:51:27 +01:00
# @title: Commandes pour le Rover Ropy
2022-08-14 08:03:07 +02:00
# @project: Ropy (Blender-EduTech)
###############################################################################
2022-10-19 23:41:15 +02:00
###############################################################################
# Initialisation du niveau :
# Niveau 1 : Les premiers pas de Ropy
# Niveau 2 : Ma première fonction
# Niveau 3 : Sécuriser Ropy
# Niveau 4 : Partir au bout du monde
# Niveau 5 : Faire face à l'inconnu
# Niveau 6 : Se rendre utile
###############################################################################
2022-08-14 08:03:07 +02:00
###############################################################################
# Fonctions
###############################################################################
###############################################################################
# Commandes
###############################################################################
def commandes():
2022-08-14 08:03:07 +02:00
2024-01-02 11:37:28 +01:00
rp_gauche()
for i in range (2):
rp_avancer()
rp_marquer()
rp_droite()
for i in range (4):
rp_avancer()
rp_marquer()
2022-08-14 08:03:07 +02:00
###############################################################################
# En: External call << DONT CHANGE THIS SECTION >>
# Fr: Appel externe << NE PAS MODIFIER CETTE SECTION >>
2022-08-14 08:03:07 +02:00
###############################################################################
def cycle():
commandes()
rp_fin()
2022-08-14 08:03:07 +02:00
if __name__=='start':
thread_cmd_start(cycle)
2022-08-14 08:03:07 +02:00
if __name__=='stop':
thread_cmd_stop()