myBlockly Initial use

1 Preparation

1.1 Python download and installation&pymycobot installation

myBlockly is a jigsaw puzzle programming software based on Python environment and pymycobot dependency library, so you need to download Python and install pymycobot

Note: Before installing, please confirm whether your computer is 64 bit or 32 bit. Right click My Computer and select Properties. As shown in the figure below, it is a 64 bit operating system, so select the 64 bit Python installation package.

  • Step 1: Downloading and installing Python

    • Python official download address: https://www.python.org/downloads/
    • ClickDownloadsoption,start to download Python,clickAdd Python 3.10 to PATH,clickInstall Now,start to install Python

    • The prompt "Setup was successful" appears, indicating that the installation is complete

  • Step 2: Pymycobot installation,there are two installation methods

    • The command is installed directly without cloning the downloaded code. Open a console terminal (shortcut key Win+R, enter cmd to enter the terminal) and enter the following command:
    pip install pymycobot --upgrade --user
    

    • To install the source code, open a console terminal (shortcut key Win+R, enter cmd to enter the terminal), and enter the following command to install:
    git clone https://github.com/elephantrobotics/pymycobot.git <your-path>   
    # Where <your path> is filled in with your installation address. If it is not filled in, it defaults to the current path
    
    cd <your-path>/pymycobot    
    # Go to the pymycobot folder of the download package
    
    # Run one of the following commands according to your Python version    
    # Install
     python2 setup.py install    
    # or
     python3 setup.py install
    

1.2 Serial drive download and installation

The serial port driver is used for robot arm communication to receive instructions, so you need to download the serial port driver before using myStudio to burn firmware. ultraArm needs to install the CP34X (applicable to CH9102 version) driver package.

Note: For Mac OS, before installation, ensure that the system "Preferences ->Security and Privacy ->Universal", and allow users from the App Store and approved developers.

  • ultraArm serial port driver:

    • Step 2: You will be prompted after the installation is successful

2 myBlockly Download

Click myBlockly to download.Follow the prompts to install.

2.1 myBlockly interface display

  • Module Bar:

    • It contains the method modules required for programming, which can be spliced by placing the mouse in the program editing area
  • Mini toolbar:

    • Click the pink button in the upper right corner to display a small toolbar, where you can select the correct model, serial port number and baud rate. You can also click the "Read Angle" or "Read Coordinates" button to obtain the real-time joint angle and coordinates of the mechanical arm. Click "+/-" in the joint control or coordinate control bar to control the movement of the mechanical arm.
  • Program editing area:

    • Before running the program, you need to select the correct model, port and baud rate in the initialization module or the mini toolbar, otherwise the program cannot run normally.
    • Drag the required module methods to the area and splice them to realize your own program.

Note:

  1. The baud rate of ultraArm is 115200;
  2. When the program cannot run, please check whether the mini toolbar is disconnected, as shown in the following figure.

3 Connecting the PC

  • As shown in the figure, use the serial port cable provided to connect the computer and the mechanical arm respectively

4 Program operation

Drag the desired method module, edit your own program (as shown in the figure above), and click "Run" after combining the structure of each module to upload the code to the mechanical arm for running.

Note: ultraArmmust return to zero before each movement,After returning to zero, a delay module must be added to give the robot arm time to return to zero before the next movement.

Click the "Python" option in the upper left corner to view the corresponding Python code, as shown in the following figure.

5 Program saving and loading

myBlockly program is saved in .json format. Click the blue box in the upper right corner of the interface, and the "Save" option appears. Click to save the program.

Similarly, click the blue box and click the "Load" option to import the saved program.

results matching ""

    No results matching ""