Simple slot Machine made out of LEGO® Mindstorms® EV3 31313 set, LEGO® 6x6 All Terrain Tow Truck 42070 set, and some other parts. Programmed on Python with EV3dev software installed on EV3. 3D Model made with LDraw system of tools and LeoCAD application. Imported to Stud.io to Make Instructions.
Sometimes you haven't got enough parts to build a model, so I split instructions into 3 main sections:
- Electronics (Up to step 19, if you have got LEGO Mindstorms EV3 31313 set)
- Decorations (Up to step 139, if you have got 6x6 All Terrain Tow Truck 42070 set)
- Front panel (All steps in instructions, if you have got two extra Technic, Panel Plate 5 x 11 x 1)
If you installed EV3dev already, just download .py file and put it in a new folder, then download it on EV3 brick with VScode, otherwise install EV3dev on EV3(Installing guide on official website) or help me create a program for normal EV3 software. The prototype here. Algorythm:
print "ready"
wait touch sensor to be pressed and released # wait for user to calibrate motors
reset A motor
reset B motor
reset C motor
repeat forever:
wait touch sensor to be pressed and released
start motor A at random speed
start motor B at random speed
start motor C at random speed
wait touch sensor to be pressed and released
stop motor A without brake
stop motor B without brake
stop motor C without brake
wait touch sensor to be pressed and released
set position of A motor to round(motor A position ÷ 45) * 45
set position of B motor to round(motor B position ÷ 45) * 45
set position of C motor to round(motor C position ÷ 45) * 45