Skip to content

Instantly share code, notes, and snippets.

@ItsJimi
Created June 10, 2017 09:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ItsJimi/7c1712ac3e800753f46f9896b462ab99 to your computer and use it in GitHub Desktop.
Save ItsJimi/7c1712ac3e800753f46f9896b462ab99 to your computer and use it in GitHub Desktop.
import threading
def getValue(directions, time):
e = threading.Event()
while not e.wait(time):
values = []
i = 0
while i < len(directions):
# Faut bouger le bras a la place de ce texte
# Faut recuperer la valeur du bras et mettre a la place du 4
value = 4
values.append(value)
i += 1
maxValue = max(values)
# La je print la valeur mais en vrai il faut bouger le bras sur sur " directions[values.index(maxValue)] "
print(directions[values.index(maxValue)])
# Directions du bras
directions = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]
# L'intervalle est en secondes, la c'est 1 seconde
getValue(directions, 1.0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment