项目作者: RocketNikita

项目描述 :
Lego slot machine
高级语言: Python
项目地址: git://github.com/RocketNikita/LEGO-Slot-Machine.git
创建时间: 2020-09-01T13:59:57Z
项目社区:https://github.com/RocketNikita/LEGO-Slot-Machine

开源协议:

下载


LEGO Slot Machine

Slot Machine image

Description

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.

Building instructions

Sometimes you haven’t got enough parts to build a model, so I split instructions into 3 main sections:

  1. Electronics (Up to step 19, if you have got LEGO Mindstorms EV3 31313 set)
  2. Decorations (Up to step 139, if you have got 6x6 All Terrain Tow Truck 42070 set)
  3. Front panel (All steps in instructions, if you have got two extra Technic, Panel Plate 5 x 11 x 1)

    Programming

    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:
    1. print "ready"
    2. wait touch sensor to be pressed and released # wait for user to calibrate motors
    3. reset A motor
    4. reset B motor
    5. reset C motor
    6. repeat forever:
    7. wait touch sensor to be pressed and released
    8. start motor A at random speed
    9. start motor B at random speed
    10. start motor C at random speed
    11. wait touch sensor to be pressed and released
    12. stop motor A without brake
    13. stop motor B without brake
    14. stop motor C without brake
    15. wait touch sensor to be pressed and released
    16. set position of A motor to round(motor A position ÷ 45) * 45
    17. set position of B motor to round(motor B position ÷ 45) * 45
    18. set position of C motor to round(motor C position ÷ 45) * 45

    Video

    video