Created
June 10, 2017 09:52
-
-
Save ItsJimi/7c1712ac3e800753f46f9896b462ab99 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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