ropy/rp_cmd.py

52 lines
1.6 KiB
Python

import time
from rp_lib import * # Bibliothèque Ropy
###############################################################################
# rp_cmd.py
# @title: Commandes pour le Rover Ropy
# @project: Ropy (Blender-EduTech)
###############################################################################
###############################################################################
# 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
###############################################################################
###############################################################################
# Fonctions
###############################################################################
###############################################################################
# Commandes
###############################################################################
def commandes():
rp_gauche()
for i in range (2):
rp_avancer()
rp_marquer()
rp_droite()
for i in range (4):
rp_avancer()
rp_marquer()
###############################################################################
# En: External call << DONT CHANGE THIS SECTION >>
# Fr: Appel externe << NE PAS MODIFIER CETTE SECTION >>
###############################################################################
def cycle():
commandes()
rp_fin()
if __name__=='start':
thread_cmd_start(cycle)
if __name__=='stop':
thread_cmd_stop()