Description
Here is a python script, which will give you the lottery numbers to play.
Related Hardware
EZ-B v4
Related Robot Skills
(python language)
The program is planned for a draw of 5 numbers and a lucky number. (French lottery). You will need to change the lottery program in your country.
here is the python code:
import random
def loto():
table1 = [(random.randint(1,49)), (random.randint(1,49)), (random.randint(1,49)), (random.randint(1,49)),(random.randint(1,49))]
tablefin = []
doublon = []
for i in table1:
if i not in tablefin:
tablefin.append(i) #supprime les doublons
else:
doublon.append(i) #extraire les doublons
d = len(doublon)
while d > 0:
#nouveau tirage
doublon = []
table1 = [(random.randint(1,49)), (random.randint(1,49)), (random.randint(1,49)), (random.randint(1,49)),(random.randint(1,49))]
# recherche doublon
for i in table1:
if i not in tablefin:
tablefin.append(i) #supprime les doublons
else:
doublon.append(i) #extraire les doublons
# si il existe doublon d+1 et vide la table
if (len(doublon)==1)or(len(doublon)==2)or(len(doublon)==3)or(len(doublon)==4)or(len(doublon)==5):
talkBlocking("j ai trouver un doublon , je refais un tirage")
d = d+1
doublon =[]
else:
d = 0
break
# tri la table avant de la dire
table1.sort()
Audio.Say("Voci les numéros a jouer au loto .")
Audio.Say("le "+str(table1[0]))
Audio.Say("le "+str(table1[1]))
Audio.Say("le "+str(table1[2]))
Audio.Say("le "+str(table1[3]))
Audio.Say("le "+str(table1[4]))
Audio.Say("Et le numéro chance le, "+str(random.randint(1,9)))
Audio.Say("Je vous souhaite bonne chance, ")
loto()
you will need to translate the sentences into the language of your country:
example: Audio.Say ("Here are the numbers to play the lotto.")
if you won, think of me, thank you ...
note : To make the EZROBOT micro-controller speak, replace Audio.Say by Audio.SayEZB . If you are interested in pthon programs, I can give you more here.
Bonjour, J'ai des difficultés à naviguer sur votre site. Pouvez-vous indiquer où se trouve votre section de téléchargement? Merci
hello https://inmoov.monsite-orange.fr/page-5c60220def7b1.html les fichiers stl sont zipper .
Bonjour, J'ai des problèmes avec la compréhension des répertoires avec les fichiers dus à des problèmes de langue. Avez-vous combiné des pièces pour l'impression puisque vous pourriez, par exemple, imprimer le torse complet à la fois avec une imprimante Crealty idf toutes les pièces ont été combinées
hello Perry , yes some parts are merged. I have a 20 x 20 x 20 printer. Not all parts are present. you have to download them from Gael's site and reduce them to 0.64. If you have a bigger printer you can of course merge several pieces
InMoov06, I would like to thank you for posting here. Your mini-moov really got me thinking about building a smaller guy and I am having a blast. I am combining as many part as I can in CAD before painting. IT is so much more managible than my big Inmoov. It is so much cheaper to build. All inmoov's should be built to this size. I have had to make design adjustments to make standard servos fit. You can really do a lot of actuator work on it as well because the size is smaller as are the forces involved are much smaller. I'm excited again.
Perry
Hi Perry, do you have the stl files for a small InMoov to print?
Hi EZAng, I started with the standard Inmoov files off Gael's site. For single prints I just scale them to 64%. I use Solidworks to combine and redesign other pieces. When I am done I will post them up on Thingiverse probably. Here's the little guy after about a week of printing.
hello perry I modified the head to integrate the camera. the stl file is on my site

little finished inmoov