yahboom
HomeTutorialsProduct
Solution
Blog
Online Store
About Us
EN/中文
Store
myCobot 320 Arm📖
1.Product Feature
  • 1.Functional Parameters
  • 2.Controller Parameters
  • 3.Structural Parameters
  • 4.Electronic Parameters
  • 5.Coordinate System
  • 6.Introduction of Adaptive Gripper
  • 7.Introduction of force-controlled gripper
2.Common Problem
  • 1.how to ask
  • 2.driver
  • 3.software
  • 4.hardware
3.First Install and Use
  • 1.Product Standard List
  • 2.Product Unboxing Guide
  • 3.Power-on Test Guide
4.Basic Application
1. miniRoboFLow
  • 1. miniRoboFLow
  • 2. Drag & Play
  • 3. Joint Calibration
  • 4. Computer Connect
  • 5. Robot Information
2.1 myblockly
  • 1. What is myBlockly
  • 2. Preparations before using myBlockly
  • 3. myBlockly download and install
  • 4. myBlockly interface display and use of basic functions
  • 5. Control RGB light panel
  • 6. Control the robotic arm to return to the origin
  • 7. Control single joint movement
  • 8. Control multiple joints
  • 9. Use of adaptive grippers
  • 10. Use of force-controlled grippers
  • 11. Q&A
  • 12. API
2.2 myStudio
  • 1. myStudio
  • 2. myStudio environment setup
  • 3. Install driver
  • 4. Burn and update firmware
3. Firmware Description
  • 1.Firmware Description
  • 2.Burn Firmware
5.Mobile APP control
  • Mobile APP control
6.SDK Development
1.Development Environment Construction
  • 1.Development Environment Construction
2.Python
  • 1.What is Python
  • 2.Environment Building
  • 3.Python API usage instaructions
  • 4.TCP IP
  • 5.Drag to teach
  • 6.Use Cases
  • 7.Use of adaptive grippers
  • 8.Use of force-controlled grippers
3.ROS1
  • 1.ROS
  • 2.Environment Building
  • 3.ROS basics
  • 4.Rviz use
  • 5.Basic function case
  • 6.Use of adaptive grippers
  • 7.Use of force-controlled grippers
4.ROS2
  • 1.ROS2 introduction
  • 2.Environment Building
  • 3.ROS2 basics
  • 4.Rviz2 use
  • 5.Basic function case
5.C Sharp(C#)
  • 1.C#
  • 2.Environmental construction
  • 3.Mechanical control
  • 4.myCobot API
  • 5.Use Cases
  • 6.Use of adaptive grippers
6.c plus plus (C++)
  • 1.C++
  • 2.CPlus Download
  • 3.build
  • 4.API
  • 5.example
7.Arduino
  • 1.Arduino
  • 2.Arduino Download
  • 3.API
  • 4.example
  • 5.Use of adaptive grippers
8.Serial communication
  • 1.Serial communication
  • 2.Use of force-controlled grippers
7.Documents Download
  • 1.Product Brochure
  • 2.Software and Source Code
  • 3.System lnformation
Download
  • 3D_Model_File
  • Android Mobile APP
  • Manual
Download ZIP

Welcome to myCobot 320 Arm repository

3.Mechanical control

Mechanical control

1 Joint control

For serial multi joint robots, joint control is aimed at controlling the variables of each joint of the robotic arm, with the goal of enabling each joint of the robotic arm to reach the target position at a certain speed

1.1 Single joint control

1.1.1 Send single joint angle

SendOneAngle(int jointNo, int angle, int speed) Return value: None Parameter Description: Parameter 1: Joint Number (1-6), Parameter 2: Angle (Range: -170 ° -170 °), Parameter 3: Speed (0-100) Example: mc.SendOneAngle(1, 100,70);

1.2 Multi joint control

1.2.1 Obtain all joint angles

GetAngles() Return value: Returns an int type array, int [], length: 6 Parameter Description: None Example: var recv = mc.GetAngles();

1.2.2 Send all joint angles

SendAngles(int[] angles, int speed) Return value: None Parameter Description: Parameter 1: All joint angles (range: -170 ° -170 °), Parameter 2: Speed (0-100) Example:

xxxxxxxxxx
int[] angles = new[] {100, 100, 100, 100, 100, 100};
mc.SendAngles(angles ,30);

1.3 Complete Use Cases

The program.cs in the project is a complete use case program that can be modified as needed

xxxxxxxxxx
    using System;

    namespace Mycobot.csharp
    {
        class Test 
        {
            static void Main(string[] args)
            {
                MyCobot mc = new MyCobot("/dev/ttyUSB0");
                mc.Open();
                // int[] angles = new[] {100, 100, 100, 100, 100, 100};
                // mc.SendAngles(angles, 50);
                // Thread.Sleep(5000);
                // var recv = mc.GetAngles();
                // foreach (var v in recv)
                // {
                    // Console.WriteLine(v);
                // }

                // int[] coords = new[] {160, 160, 160, 0, 0, 0};
                // mc.SendCoords(coords, 90, 1);
                // Thread.Sleep(5000);
                // var recv = mc.GetCoords();
                // foreach (var v in recv)
                // {
                    // Console.WriteLine(v);
                // }

                mc.SendOneAngle(1, 100,70);

                // byte[] setColor = {0xfe, 0xfe, 0x05, 0x6a, 0xff, 0x00, 0x00, 0xfa};
                mc.Close();
            }
        }
    }

2 Coordinate control

Coordinate control is to move the robotic arm to a specified point in a specified posture, divided into x, y, z, rx, ry, and rz. X. Y and Z represent the position of the robotic arm head in space (which is a Cartesian coordinate system), while rx, ry, and rz represent the pose of the robotic arm head at that point (which is an Euler coordinate system)

2.1 Single parameter coordinates

2.1.1 Send single parameter coordinates

SendOneCoord(int coord, int value, int speed) Return value: None Parameter Description: Parameter 1: Coordinate Number (1-6 ( x, y, z, rx, ry, rz )), Parameter 2: Coordinate ( X, Y, Z value range -300-300.00 units mm RX, RY, RZ, value range -180-180), Parameter 3: Speed (0-100)

Example:

xxxxxxxxxx
`mc.SendOneCoord(1, 160,30);`

2.2 Multi parameter coordinates

2.2.1 Obtain all coordinates

GetCoords() Return value: Returns an int type array, int [], length: 6 Parameter Description: None Example: var recv = mc.GetCoords();

2.2.2 Sending multi parameter coordinates

SendCoords (int [] coords, int speed, int mode) Return value: None Parameter Description: Parameter 1: All coordinates (X, Y, Z value range -300-300.00 units mm RX, RY, RZ, value range -180-180), Parameter 2: Speed (0-100), Parameter 3: Mode (0-angular, 1-linear) Example: int[] coords = new[] {160, 160, 160, 0, 0, 0}; mc.SendCoords(coords ,30);

2.3 Complete Use Cases

The program.cs in the project is a complete use case program that can be modified as needed

xxxxxxxxxx
    using System;

    namespace Mycobot.csharp
    {
        class Test 
        {
            static void Main(string[] args)
            {
                MyCobot mc = new MyCobot("/dev/ttyUSB0");
                mc.Open();
                // int[] angles = new[] {100, 100, 100, 100, 100, 100};
                // mc.SendAngles(angles, 50);
                // Thread.Sleep(5000);
                // var recv = mc.GetAngles();
                // foreach (var v in recv)
                // {
                    // Console.WriteLine(v);
                // }

                // int[] coords = new[] {160, 160, 160, 0, 0, 0};
                // mc.SendCoords(coords, 90, 1);
                // Thread.Sleep(5000);
                // var recv = mc.GetCoords();
                // foreach (var v in recv)
                // {
                    // Console.WriteLine(v);
                // }

                mc.SendOneAngle(1, 100,70);

                // byte[] setColor = {0xfe, 0xfe, 0x05, 0x6a, 0xff, 0x00, 0x00, 0xfa};
                mc.Close();
            }
        }

3 IO control

There are pins on both the Basic and Atom pins at the bottom of the robotic arm, which can be controlled by IO to set the high and low levels of the pins and control tools such as pumps (the pin numbers can be viewed from the pin labels attached to the Basic and Atom pins, which are shared for input and output)

3.1 M5Stack basic IO control (m5)

3.1.1 Set the high and low levels of output IO

SetBasicOut(byte pin_number, byte pin_signal) Return value: None Parameter Description: Parameter 1: Pin Number (Basic Output Pin Number), Parameter 2: State (0- Low Level, 1- High Level) Case:

xxxxxxxxxx
mc.SetBasicOut(2, 1);
Thread.Sleep(100);
mc.SetBasicOut(5, 1);
Thread.Sleep(100);

3.1.2 Obtaining Input IO Status

GetBasicIn (byte pinnumber) Return value: Pin status (0- low level, 1- high level) Parameter Description: Pin Number (Basic Input Pin Number) Example: Set output pin 2 to high level

xxxxxxxxxx
Console.WriteLine(mc.GetBasicIn(35));
Thread.Sleep(100);
Console.WriteLine(mc.GetBasicIn(36));
Thread.Sleep(100);

3.2 Atom io Control

Note: 320m5 does not have atom io, so it is not necessary to use this module API

3.2.1 Setting the high and low levels of output IO

SetDigitalOut (byte pinnumber, byte pin_signal) Return value: None Parameter Description: Parameter 1: Pin Number (Atom Output Pin Number), Parameter 2: State (0- Low Level, 1- High Level) Case:

xxxxxxxxxx
mc.SetDigitalOut(23, 0);
Thread.Sleep(100);
mc.SetDigitalOut(33, 0);
Thread.Sleep(100);

3.2.2 Obtaining Input IO Status

GetDigitalIn (byte pinnumber) Return value: Pin status (0- low level, 1- high level) Parameter Description: Pin Number (Atom Input Pin Number) Case:

xxxxxxxxxx
Console.WriteLine(mc.GetDigitalIn(19));
Thread.Sleep(100);
Console.WriteLine(mc.GetDigitalIn(22));
Thread.Sleep(100);

3.3 Complete Use Cases

x
    using System;
    using System.Threading;

    namespace Mycobot.csharp
    {
        class Test
        {
            static void Main(string[] args)
            {
                MyCobot mc = new MyCobot("COM57");//Raspberry Pi robotic arm serial port name: /dev/ttyAMA0
                mc.Open();
                Thread.Sleep(5000);//After Windows opens the serial port, you need to wait for 5 seconds, and the basic button at the bottom of Windows will restart when it opens the serial port.

                //set basic output io
                /*mc.SetBasicOut(2, 1);
                Thread.Sleep(100);
                mc.SetBasicOut(5, 1);
                Thread.Sleep(100);
                mc.SetBasicOut(26, 1);
                Thread.Sleep(100);*/

                //get basic input io
                Console.WriteLine(mc.GetBasicIn(35));
                Thread.Sleep(100);
                Console.WriteLine(mc.GetBasicIn(36));
                Thread.Sleep(100);

                //set atom output io
                /*mc.SetDigitalOut(23, 0);
                Thread.Sleep(100);
                mc.SetDigitalOut(33, 0);
                Thread.Sleep(100);*/

                //get m5 input io
                /*Console.WriteLine(mc.GetDigitalIn(19));
                Thread.Sleep(100);
                Console.WriteLine(mc.GetDigitalIn(22));
                Thread.Sleep(100);*/

                mc.Close();
            }
        }
    }

4 gripper control

Claw installation: The adaptive gripper inserts the gripper onto the pins on the atom, as shown in the following figure: 9-6-001 The electric gripper is inserted at the 485 interface on the top, as shown in the following figure: Attention: myCobot280 and myPalletizer 260 do not have electric grippers, only myCobot320 has electric grippers 9-6-002

4.1 Adaptive gripper control

Supported devices: myCobot280, 320&&myPalletizer 260

4.1.1 setGripperValue (byte angle, byte speed)

Return value: None

Call the interface before use Case:

xxxxxxxxxx
mc.SetGripperMode(0);

Parameter Description: Parameter 1: Claw opening and closing angle (0-100, 0- closed, 100- maximum opening angle), Parameter 2: Claw opening and closing speed (0-100)

Case: mc.setGripperValue(0, 10); Thread.Sleep(3000); mc.setGripperValue(50, 100); Thread.Sleep(3000);

4.1.2 getGripperValue ()

Return value: int type, returns the gripper angle (0- closed, 100- maximum open angle) Parameter Description: None Case:

xxxxxxxxxx
`Console.WriteLine(mc.getGripperValue());`

4.2 Electric gripper control

Supported devices: myCobot320

4.2.1 setEletricGripper (int state)

Return value: None Parameter description: Claw switch status (0- off, 1- on) Case:

xxxxxxxxxx
`mc.setEletricGripper(0);`

4.3 Complete Use Cases

x
        using System;
    using System.Threading;

    namespace Mycobot.csharp
    {
        class Test
        {
            static void Main(string[] args)
            {
                MyCobot mc = new MyCobot("COM57");//Raspberry Pi robotic arm serial port name: /dev/ttyAMA0
                mc.Open();
                Thread.Sleep(5000);//After Windows opens the serial port, you need to wait for 5 seconds, and the basic button at the bottom of Windows will restart when it opens the serial port.

                //set gripper open or close 0--close 100-open max 0-100
                mc.setGripperValue(0, 10);
                Thread.Sleep(3000);
                mc.setGripperValue(50, 100);
                Thread.Sleep(3000);

                //set electric gripper
                mc.setEletricGripper(0);
                Thread.Sleep(100);
                mc.setEletricGripper(1);
                Thread.Sleep(100);

                //get gripper state 0--close 1--open
                Console.WriteLine(mc.getGripperValue());
                mc.Close();
            }
        }
    }
Environmental construction
myCobot API

COMPANY

  • About us
  • Team Style
  • Blog

LEARNING & EXPLORATION

  • Tutorials
  • Edge AI hardware
  • Educational robots
  • Embedded intelligent hardware

WHERE TO BUY

  • Yahboom Online Store
  • Amazon
  • Alibaba
  • AliExpress
  • Mercado

TECHNOLOGY SUPPORT

  • Email: support@yahboom.com

BE A DISTRIBUTOR

  • Email: sales@yahboom.com
QR Code

Copyright © 2017-2026 Yahboom. All Rights Reserved.

EN/中文